Skip to main content
FrankNatoli
Associate III
August 31, 2023
Solved

STM32G030K6T6 fails to respond to bootloader I2C

  • August 31, 2023
  • 2 replies
  • 2508 views

Have STM32G030K6T6 system that in bootloader mode fails to respond to I2C.
Am asserting BOOT0 pin 25, negating NRST pin 6, wait 500ms, asserting NRST pin 6, wait three seconds, then attempt to send MCU erase packet to I2C1 device address 0x57 but get NACK.
DSLogic Analyzer shows good I2C write to 0x57 but NACK in response.
Is there any signal from MCU that indicates the MCU is ready for bootloader download?

This topic has been closed for replies.
Best answer by TDK

> DSLogic Analyzer shows good I2C write to 0x57 but NACK in response.

The 7-bit slave address on I2C1 STM32G03xxx bootloader is 0x58 0x56. With the write bit appended, it would be to 0xAD.

TDK_1-1693502034563.png

 

 

2 replies

TDK
TDKBest answer
Super User
August 31, 2023

> DSLogic Analyzer shows good I2C write to 0x57 but NACK in response.

The 7-bit slave address on I2C1 STM32G03xxx bootloader is 0x58 0x56. With the write bit appended, it would be to 0xAD.

TDK_1-1693502034563.png

 

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
FrankNatoli
Associate III
August 31, 2023

That's what I get for copy+paste code that works for an STM32H7B3I.
Many thanks!

Tesla DeLorean
Guru
August 31, 2023

Subsequent thread  https://community.st.com/t5/other-tools-mcu/stm32g030k6t6-fails-to-respond-to-bootloader-i2c-revised/td-p/586691

You can edit or add to current threads, generally I'd prefer that if it is just a continuation of the original issue

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
August 31, 2023

What platform are you using to talk to it ? NACK is indicative that it doesn't recognize the address, or just not present. Start with a Write. Using PB6/PB7 or PB10/PB11 ?

The high order address is 0xAC or low order 0x56? Slave 7-bit address: 0b1010110x

https://www.st.com/resource/en/application_note/an4221-i2c-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
August 31, 2023

>>Is there any signal from MCU that indicates the MCU is ready for bootloader download?

No, you could try a connection via USART with a simple 0x7F data pattern at 8E1

Noise on other interfaces, like a GNSS squawking, will be seen as a connection attempt.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..