2025-10-03 7:51 AM
Hi,
Currently my STM32F767 is coming up in dual bank mode (I'm not sure why, since this does not seem to be the default) but I want to turn this off so I get the full 2Mbytes.
However, I can see from AN4826 that if I turn off dual bank mode while the software is running, it's likely to crash because the flash width changes from 128 bit to 256 bit.
I thought there would be a way to set the bank mode in CubeIDE, but I cannot find it anywhere. If I use CubeIDE to program an image into flash, then that seems to effectively limit me to dual bank mode and only 1Mbyte of flash.
Can you advise me how I can turn off dual bank mode so that the image is programmed in by CubeIDE as a single-bank image?
Regards
Robin Terry
2025-10-03 8:32 AM
Hello @robinterry-minicam
To switch from dual-bank to single-bank mode , we recommend using STM32CubeProgrammer to modify the flash option bytes by :
1- Connect your device to your PC and open STM32CubeProgrammer.
2- Navigate to the Option Bytes tab on the left sidebar (highlighted as "OB" in the image).
3- Under User Configuration, locate the option named nDBANK.
4- You will see that:
When unchecked, the device operates in dual bank mode with 128-bit read access.
When checked, the device operates in single bank mode with 256-bit read access.
5- To disable dual bank mode, check the nDBANK box to enable single bank mode.
6- Click Apply to program the option bytes.
Br