This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C in MDK5 (STM32F4)

I have big problems getting I2C working with MDK5. SendData and ReceiveData functions will stuck on semaphore.

I have custom board with STM32F4 and Atmel eeprom on it's I2C. Hardware is tested to be working with software using ST libraries. Now I'm trying to get it working with Keil MDK5 but struggling with it for weeks...

Software packs are installed. Run-time environment are set. I2C2 enabled in RTE_Device.h with correct GPIO pins.

Software calls Driver_I2C2.Initialize(NULL) and Driver_I2C2.PowerControl(ARM_POWER_FULL). Return values for both are OK.

Trying Driver_I2C2.SendData() or Driver_I2C2.ReceiveData() will stuck to semaphore on Keil implementation. Not sure if addr parameter on those should be only device address (telling the correct device on I2C, 0xA0 in this case) or combined with word address (telling data location on eeprom). I have tried all possible combination which I can imagine and even some more.

Does anybody have a working I2C implementation to show how this should be done in MDK5, please. Or any guesses what's wrong in the environment.

Parents Reply Children
No data