AnsweredAssumed Answered

k60n512 mqx I2C demo problem

Question asked by Massimo Cristofolini on Mar 13, 2012
Latest reply on Jun 6, 2012 by Massimo Cristofolini

Hi everyone.


I got a TWR-K60N512 a while ago and I'm making some experiments using CodeWarrior 10.2.

I'm trying to let the I2C demo working, and then modify it to work with an external device (led driver).

The base project write and read from the EEPROM, with I2C address 0x50 (defined in the eeprom.h file).

Everything compiles fine (BSPCFG_ENABLE_I2C0 and BSPCFG_ENABLE_II2C0 are both set to 1 in user_config.h, and the bsp library was recompiled with these settings).

Loaded on RAM, everything seems to work, but nothing will be written/read.

You can find the serial output attached.


I used an ocilloscope to analyze the SDA, SCL signals, and what I get is that:

- instead of address 0x50 I see 0xA0

- I don't get the ack from the eeprom

- the communication terminates after a long gap ( > 3 ms)

You can see a time diagram attached.


I tried to define the EEPROM address as 0x50 >> 1, so I see 0x50 on the SDA, but I still get no ack.

Analyzing the main board demo (accelerometer, memory game, ...), I've seen that in Accel_Task.c the accelerometer address is defined as 0x4C but on the SDA I get 0x98, that is 0x4C >> 1. So I suppose that EEPROM has I2C address 0xA0, and it's correct to define it as 0x50 (==0xA0>>1) in my program. By the way, EEPROM isn't responding... The accelerometer demo work fine, instead.



Any hint?





P.S.: psudo-related. Is there a BOM of TWR-K60N512 board? I need to get some connectors for TWRPI pins, but I can't get the type/dimensions.