cancel
Showing results for 
Search instead for 
Did you mean: 

Does dual-bank read-while-write work properly in STM32L496?

KLam.11
Associate II

My project uses dual-bank flash memory, bank 1 (0x0800 0000) for main code and bank 2 (0x0808 0000) for ota image and also allocated (0x080F F000) for saving the system setting. After switching bank (FB_MODE =1), the main code runs at (0x0808 0000) and ota image at (0x0800 0000) and system setting keeps at (0x0807 F000)

Q1) In datasheet, "With its dual-bank capability, it is

possible to read from one bank while programming/erasing the other bank, code execution is not stopped when the Flash

memory is being programmed." "Code execution is not stopped"

including all interrupts action? Because we faced that the USART interrupt

somehow disturbed by flash read/write/erase at (0x080F F000) when FB_MODE = 0.

Q2) Is there any problem if flash read/write/erase at (0x0807 F000) when FB_MODE = 1? Because in my understanding, when FB_MODE = 1, (0x0807 F000) is in the same bank with main code, it should be “AHB stalled as long as BUSY�? stated in datasheet. But now seems working fine, flash can be read/writed/erased most of time but encountered Q1 issue. Please advise if I’m do it correctly? or I have to copy the system setting to (0x080F F000) every time when switching bank?

Thanks and regards,

Kevin

0 REPLIES 0