AnsweredAssumed Answered

STM32F103RE crashes when I2C2 and UART4 used simultaneously.

Question asked by muirhead.jared on Apr 11, 2016
Latest reply on Apr 12, 2016 by Clive One
I am an engineer at a startup developing a new flight controller for hobby aerial vehicles.  We are using the STM32F103RET6 microcontroller.  I am currently having an issue using I2C2 and UART4 simultaneously.


We receive battery charge info from I2C2 (pins PB10, PB11) and GPS data from UART4 (PC10, PC11).  When both are used simultaneously, the microcontroller will crash after a few minutes of operation, though the exact time varies from trial to trial.  Using a logic analyzer shows that the crash occurs only if an I2C2 read occurred at the same time as a UART4 message.  This condition appears necessary, but not sufficient.  That is, I2C2 often reads at the same time as UART4 receives without any issue, but the crash always occurs in that scenario.


Using either device on it's own not produce a crash.  The only workaround I have found is by disabling all USART/UART interrupts from I2C2 start condition to I2C2 stop condition, though this is obviously less than ideal.


I cannot find anything in the datasheet or errata about this phenomenon.  Any advice is appreciated.  Thank you.

Outcomes