2022-01-25 06:30 AM
Using STM32L552 Bootloader to flash new firmware via CAN-FD port only the first 512 bytes are changed starting from address 0x8000000 even though Write Unprotect (0x73) and Readout Unprotect (0x92) has been sent according to AN5405. Erase Memory (0x44) is working by setting all memory to 0xFF.
What needs to be done to flash new firmware beyond the first 512 bytes?
2022-01-31 07:52 AM
Hi @KBorc.1 ,
Thanks for your answer.
==> do you mean that you execute write command 4 times?
==> is what you get a different behaviour than initially described issue (only the first 512 bytes are changed)?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-01-31 08:13 AM
Hello Amel,
I mean sending "0x31 {address} 0xff" which requires to send 4 blocks of 64 byte of data according to AN5405.
There is no different behaviour than initially described. I only provided these details so you can check it and see if there is anything to correct.
kind regards
Karl
2022-01-31 09:11 AM
Hi @KBorc.1 ,
Please note that the maximum length of the block to be written is 256 bytes via FDCAN interface, in one single Write Command. (This is documented in AN5405, page 14).
In order to write 512 bytes, you will have to send 2 Write Commands with 256 bytes each time.
Also, please make sure to set writing addresses properly:
Do you confirm that this is what you are doing?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2022-01-31 09:39 AM
Hi Amel,
the hexfile I am flashing requires to send
kind regards
Karl
2022-01-31 12:23 PM
Hi Amel,
after sending my last answer I got the idea to reorganize my hex-reading so as to write 256 bytes each from 0x08000000, 0x08000100, 0x08000200, 0x08000300 ... and it work!!
So I am wondering what is the reason my original flashing did not work?
Thank you very much for bearing with me.
kind regard
Karl
2022-02-01 07:15 AM
Hi @KBorc.1 ,
It is required to have double-word aligned address. This is described in RM0438 page 187.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-03-17 06:49 AM
Finally got my STM32 Nucleo L073RZ bootloader Write working. It's been a real puzzle for me for a few weeks....
The trick was to apply the Read Protect first, then apply the Read Unprotect. It is only then that the RDP gets disabled. Then apply the Write unprotect. Hey presto, the Writes then work.