2025-11-19 6:28 AM
Hi,
We have a weired problem with a custom N657 design.
When using the Nucleo board, its possible to flash the program on the external flash, as long as BOOT1=1.
The programmer resets the board and it flashes the firmware normally every time.
On our board we use the internal SMPS and the same external flash with the same diode in the nrst circuit.
Wenn i do a power up with BOOT1 pulled up, it flashes without error and the program runs as expected, when i change it to BOOT1=0 and hit reset.
But when i want to reflash it, it won't do it.
The LED is on and the programmer can connect, but the erase and reflash of the external flash is failing every time until i do a power cycle.
The reset signal is reaching the flash, as it should.
What could be the problem?
2025-11-21 7:57 AM
I know this isn't the answer you want, but I am having a very similar problem. Custom board, but same flash chip, same circuitry. Unable to flash code into the flash chip using the ST Programmer. Sometimes it works after a POR.
I contacted support and the result ended up being "Huh, that's real weird. Your circuit looks right. I dunno man, good luck."
I ended up needing to write my own uart/serial based firmware upgrade program in the bootloader, run it out of RAM/debugger for the first time, and use that to write data into the flash chip using a custom controller all in the firmware. It's slower than ST Programmer but it works.
2025-11-25 10:37 PM
Yeah that is really unfortuate,
I built a circuit to do a full power cycle if i go into the DEV mode, that is working pretty good now.
Another issue i have found is, that PA5 so the normal LPUART_TX pin needs to be pulled up for the system to boot.
I dont know why, its not documented anywhere as i can see.
We use different Pins for the STLINK UART, so i remuxed them in software, which should be no problem.