cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H753 writing option bytes stalls execution

NPato
Associate II

Hi,

We are using an STM32H753 (revision V) and using the bank swap functionality to implement a firmware update system. To do this we need to write to the option bytes to toggle the bank swap bit.

This process works but we have noticed that when the currently active bank is the same as the bank which holds the option bytes (the first bank) changing the swap bit will stall the system until complete. The stall happens very soon after the OPTSTART bit in the FLASH_OPTCR register is set and lasts for around 300ms. This does not happen if the code is running from the bank that the option bytes are not located in.

It looks like all flash accesses to the bank with the option bytes in are stalled while a option byte update is performed. As far as I can tell this is not mentioned in the documentation.

Is there a workaround for this?

One option could be to start locating more code in RAM, but we may not have enough RAM to do this.

Thanks

Nigel

0 REPLIES 0