cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Communication is not working in Debug Mode

While implementing I²C communication between the STM32F446RE and the MPU6050, the communication does not work when running in debug mode. However, if the board is reset by just unplugging and re-plugging the power, the I²C communication works correctly, as verified with a logic analyzer. But the communication is not observed in debug mode. What might be the issue

2 REPLIES 2
mbarg.1
Senior III

Well, first I would check that debug and runtime codes are same size and same variable allocation.

Debug does nothing untill it is stopped or used for real time variable evaluation, cannot by design disturb MCU operation unelss instructed to do so.

Ozone
Principal

You need to be more precise, and reveal a bit more information about your setup.

What do you mean with "debug mode" ?
There is no such thing on a Cortex M. Either you mean the debug build (rather than "release"), or you mean in a debug session.
The executable is essentially the same.

Second, "is not working" is not a very accurate or detailed description.
Do you see anything on the bus ?
Or no ACK response ?