2025-06-12 6:36 AM
Hello World;
My Setup:
Goal: Using ROM Bootloader over I2C for firmware updates (later on custom hardware)
Problem: I2C hangs after issuing Mass Erase command
Send: 0x45 0xBA Erase-NS Command
Receive: 0x79 ACK
Send 0xff 0xff 0x00 Special Erase
Receive for ACK or NAK hangs while sending the I2C device address.
AN4221 says "Some products do not support the mass erase feature." Does STM32F767 support mass erase?
2025-06-12 4:13 PM
Looks like you eventually get an ACK based on your logic analyzer screenshot. How long does this take? Is the flash erased after this?
Does the regular Mass Erase command work (0x44 0xBB)?
Setting RDP 1 then reverting to RDP 0 will also mass erase the flash.
2025-06-12 4:28 PM
I'd expect it to work, but could take it's time to complete, and might cause the processor to stall and not be responsive to real-time interaction.
2025-06-12 11:24 PM
@TDK wrote:Does the regular Mass Erase command work (0x44 0xBB)?
I don't know. Currently I'm using the stm32flash 0.7 tool from here https://sourceforge.net/projects/stm32flash/ , and this happens to use this specific command. My plan was to avoid writing my own tool, but I may have to do so.