I2C Problem: No data on Port

I am using the Q2687G and a Dev board with firmware version R74 and M2M studio V1.0.2. Now the problem I am having is with I2C and using the example form Wavecom: extstorage_iic.c.

I get no data on my I2C port with a oscilloscope, SDA (GPIO27), SCL (GPIO 26), VCC 2V8 to power the I2C bus and a common ground. Both lines stay high, the start procedure does not even initialize. In my shell target I wrote the command: at+SETMODE=1 then at+WRITE= (1EEE),(1).

I get the trace:
Data write1: 403449740
[M24CXX Driver] compute access (address : 0 (length 16))
M24CXX Driver write

Can anyone please help me with this. If I can only get a result on the I2C port…


Have you got the right pull-up resistors in the I2C lines? I2C is open collector (or open drain) and requires the SDA & SCL lines to be pulled high when the bus is idle. Not just any resistors will do, either - the values have to be right to enable the line drivers to operate within the I2C spec. I’m not sure off the top of my head what the values are for 2V8 though.

Can I assume that the 2V8 is that supplied by the Q2687 onboard reg? If so, remember that the reg can only deliver 10-15mA of current - so again, watch what value resistors you use so that you don’t exceed the current capacity of the Q2687 (otherwise you could end up with a dead module!).

Also, try using GPIO26/27 as general purpose GPIO to test that they are actually being driven correctly. Quick way to do this is to disable your app (AT+WOPEN=0) - then use the AT+WIOM family of commands from the serial console. You’ll need to check the AT command guide for the correct sequence…

Hope this helps.

ciao, Dave

Hi Dave,

The 2V8 is supplied by the q2687 and for the pull-up resistors I tried 1K, 2K and 3K3. On other discussions users advise using 2k, in the Customer Design Guidelines (p32), it states I must use a 1K resistor. And according to the I2C manual (p17) by Philips, the pull-up calculation is: R = [Vdd(min) - 0.4V]/3mA. So I have to have a resistor of about 700R. Is this correct?

Also I did as you asked me, I tried using the at commands:
AT+WIOM? Response -> Ok
AT+WIOM=? Response -> Ok
AT+WIOM=(26),(1),(0) Response - > error

All of these commands gives me the wrong response. I also did stop the application first with: AT+WOPEN=0. Do you know what the problem can be?

I’m using 2k2 resistors in my design. (you should choose them as high as possible to prevent exces heat generation from the powerdrain in your components)

to better understand what was needed to use I2C on my Q2686 module, I trimmed all the excess code from the sample program and i just made a timer which wrote the same set of bytes over and over again on the bus.

Currently I am using a 2K resistor and the wavecom example should work, after that I can trim and mesh it into my program. I am now going to try using a separate 2V8 supply.

Hey got it to work now, it was some problem with my Oscilloscope. But I got A signal now.