AnsweredAssumed Answered

STM32F103C8T6 I2C in Interrupt Mode

Question asked by sousa.flavio on May 28, 2018

Hello everyone

I am having problems with I2C in interrupt mode. When STM32 attempts to communicate with multiple devices, STM32 is sometimes busy and can not send that byte waiting to be sent via I2C. What is the consequence of this? When STM32 will send the byte, its value in the RAM memory has already changed and so it ends up sending a wrong value through the I2C. This happens a lot when I try to initialize an I2C display that has a startup routine and can not send wrong bytes. Because this device uses many I2C routines with global variables, its values are constantly changed.

I was trying to use the DMA to solve the problem but I have the same problem since even for the DMA, I will need to organize what will be sent / received by I2C (I mean the time of the order of the transmissions to happen).

Does anyone have any concerns how to solve this problem?

Thanks all.