STM32L452 SPI Bootloader (internal, from system memory)
Hello everyone,
I have the following issue: when I try to flash firmware over SPI Bootloader and send data by command 0x31U (Write Memory) then read data by 0x11U (Read Memory) I got corrupted data, some words still have 0xFFFFFFFF value.
Command 'read memory' return the correct(real) data, I checked it by st-link directly. It is mean command 'Write Memory' work incorrect.If I try to write data and then verify it again, after ~15 attempts, finally, I am getting the correct result.
I implemented delay as provided in the documentation but this can't improve the situation.
Document
DocID024458 Rev 4,
AN4286,
SPI protocol used in the STM32 bootloader
Note: In some operating conditions, the Master has to wait for a delay of 1 ms after receiving the
Acknowledge and before sending the data frame (number of bytes to be written, data to bewritten and checksum).Detail:
Bootloader version: 0x11
Chip Id: 0x0462Payload size: 256 HWSPI Clock = 1MHzLSE is present,
HSE is absentPower = 1V8
Command sequence:
1. Sync word, wait for ack2. Get version
3. Get Chip ID4. Read the first page5. Mass Erase if the first page not empty6. Write 256 bytes
7. Read 256
8. Verify
9. Goto step6 if Verify failed.
10. Write next 256 bytes and verify and etc...
What do I wrong? Could you provide some advice?BR,
Denis#system-memory #spi-bootloader #stm32l4