Skip to main content
Visitor II
August 22, 2025
Question

I2C Communication is not working in Debug Mode

  • August 22, 2025
  • 3 replies
  • 483 views

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

    This topic has been closed for replies.

    3 replies

    Graduate
    August 22, 2025

    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.

    Explorer
    August 22, 2025

    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 ?

    Super User
    December 2, 2025

    Possibly similar question: I2C Communication not working in Debug Mode.