cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting hardfault when trying to change bank mode from single to dual in STM32F765 by making nDBANK = 0 from FLASH_OPTCR register.

VShah.5
Associate

Hello there,

While I am trying to switch to dual bank mode (by making nDBANK =0) from default(single bank) mode of internal flash with STM32F765 controller, landing up in hardfault.

After resetting from hardfault when trying to read nDBANK bit from FALSH_OPTCR register it is 0.

Why that hardfualt occurs? Bank switch function is getting called from main function.

Is this right way to switch to dual bank mode? I mean what could be ideal location for this switch function to be called to avoid hardfault?

Thanks!

0 REPLIES 0