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?
Solved! Go to Solution.
2025-06-13 6:55 AM
Read the flash size register.
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.
2025-06-13 5:59 AM
Ok, I started to make my own tool, and it seems to work now. Takes about 16s for a 2MB part.
STM32F767 is available with 1MB or 2Mb of flash? How do I know which type I have? The ID is the same for all of them.
2025-06-13 6:52 AM
What chip do you have? There are more letters after STM32F67 that indicate flash size.
2025-06-13 6:53 AM
I'd rather like the bootloader client to figure this out automatically.
2025-06-13 6:55 AM
Read the flash size register.