Skip to main content
Ajoha.2
Visitor II
March 26, 2021
Question

STM32L4R5 Flash programming and dual bank switch

Hello community,

I'm currently having issues or perhaps not fully understanding the procedure of writing data to the MCU bank 2 and then switching to this bank to run the program from bank 2.

My setup for now is using a custom protocol for sending the generated .bin file through uart. I am currently just sending the .bin file in chunks to the first addr of bank 2(0x08080000) and incrementing it for every 8 byte write.

I do erase the bank 2 before writing to it. Here my understanding is that the number of pages is 127 and i start on page 0.

Once the write is done my unnderstanding is I should enable the BFB2 bit inorder for the MCU to boot from BANK2 once the system resets?

I have not been able to switch successfully, because I still get returned bank 1 being used when BFB2 bit is set.

This topic has been closed for replies.

1 reply

VTaya.1
Associate III
April 2, 2021

Use GO command to tell the application code start address.

If you could share your UART communication code block , It would be helpful to me.