Skip to main content
Visitor II
August 14, 2025
Question

STM32G071: I2C Bootloading using system bootloader issue

  • August 14, 2025
  • 2 replies
  • 433 views

Hi,

 

I have implemented a function to jump to system memory from main application.

And it is working absolutely fine on NUCLEO-G071RB and I am able to flash the controller using I2C Boot loading method using stm32flash.

 

But same code when I tried with different controller of same series STM32G071CBU7 (small package) the behavior is intermittent. As some time it is working and some time I am getting NACK from I2C. 

 

Can some one help me to point out what could be wrong here.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    August 14, 2025

    Dear @skdanish-007 ,

     

    Please refer to our AN2606 : Introduction to system memory boot mode on STM32 MCUs - Application note, Rev68

    Table 99. STM32G07xxx/08xxx bootloader versions ,  V11.3 version has a Known limitation

    "I2C stretches the line on the connection causing issues with some HW hosts
    Root cause: USART3 detection method changed compared to the V11.2: a loop is added when a
    low edge is detected on the RX pin as the BL SW start baudrate calculations expecting it is the begining of 0x7F byte. When the RX pin PC11 is tied to GND (manually on 64-pin packages or by production on low pin count packages), the USART3 detection loop is done on every Bootloader detection phase, causing a timeout wait when another peripheral is needed.
    Behavior: When connection to I2C is requested (host sends I2C address to the bootloader), the I2C HW detects the request ,but the BL SW is blocked on the USART3 SW loop, causing the I2C line stretching. Some HW hosts that do not support the stretching fail connecting with bootloader.
    Workaround: on 64-pin packages, do not put PC11 pin to GND. There is no workaround on low pin count packages, the only solution is to use a HW host supporting the clock stretching"

    I believe you are hitting this case as on Nucleo it is using 64-pin package we have PC11 and you can check it, however on smaller package not possible .

    Another option is to order the new parts with Version V11.4 and contact your ST representatives or distributor.

    Hope it helps you

    STOne-32.

    Visitor II
    August 14, 2025

    Hello,

     

    Thank you for your quick response.

    Indeed I simulated the scenario with PC11 connected to ground on nucleo board and observe same issue that was happening with low pin count controller.

    I have one query related to as you mentioned hw host with clock stretching will work.

    Do you mean if clock stretching is enabled in hw host with maximum clock stretching timeout it will work?

    Technical Moderator
    August 14, 2025

    Dear @skdanish-007 ,

    Normally Yes, if the HOST controller is supporting clock stretching it should work. However as we explained it is a non wanted behavior and a kind of workaround we propose for some applications.

    Regards,

    STOne-32 

    ST Employee
    August 14, 2025

    Hello @skdanish-007,

    This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

    Best regards,
    Maxime