Problem with system bootloader on NUCLEO-H503RB using UART interface
I'm using system bootloader to write to flash memory on NUCLEO-H503RB evaluation board. The interface used is UART. I received ACK confirmation (0x79) for every command I sent: UART bootloader activation (0x7F), Extended Erase Memory (0x44) and multiple Write Memory commands (0x31). I'm writing about 58K to flash. When I checked what was actually written I found out that only first 600 (!?) bytes are correct but all the rest bytes are 0xFF's! Do you have any idea what the problem is? Only thing I noticed that first 600 bytes are actually vector table (150 pointers x 4 byte per pointer). So, vector table is written well, but all other bytes are not, even though I received ACK confirmation for every command.
Some background information. I'm doing this programming with other STM32 microcontroller (to be precise it is STM32H765). I'm reading HEX file from the SD card. I checked every step of programming. Did I read correct bytes from the file on SD card? Yes. Did I write each and every byte using Write Memory command? Yes. Did all the addresses sent to this commands are correct? Yes. Etc. I'm executing one Write Memory command per 16 bytes (this is how HEX file is organised, 16 bytes per line). I also tried to send the wrong CRC and indeed I received NACK as expected. So it seems every step of programming is correct yet only 600 bytes of ~58K is actually written correctly.
P.S. Sorry for the long post.
