cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 dual bank mode vs flashing tools

Pavel A.
Evangelist III

Don't have a eval board currently, waiting for order to arrive.

Can anyone tell whether CubeProgrammer and other popular tools will properly detect that F7 is in dual bank mode, so it has a different number and size of sectors?

Can these tools set the option bit that enables dual bank mode and flash the data in a single programming pass, or first we have to enable dual bank, disconnect, connect again and flash the data?

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

Hello @Pavel A.​,

I invite you to take a look at this X-CUBE-DBANK-F7, this firmware is intended to describe the STM32F7 Flash-memory dual-bank capabilities.

So indeed, CubeProgrammer could detect the dual bank mode through User Configuration OB nDBANK, which is not present in STM32H7 for example. The base address of the Flash sectors and sizes should be defined by the user in the main.h.

Second, you don't have to disconnect and connect the board to flash data. All you need to do is to check or uncheck nDBANK OB to specify the FLASH mode: single bank or dual bank and apply. Then flash the code depending on the specified FLASH mode.

Just one more thing, it is recommended to execute code from SRAM or use bootloader to avoid reading corrupted data from Flash when the memory organization is changed any access (CPU or DMAs) to Flash memory should be avoided before reprogramming.

I suggest to take a look at the RM0410 section 3.3.6 Switching from single bank to dual bank configuration for further details

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
FBL
ST Employee

Hello @Pavel A.​,

I invite you to take a look at this X-CUBE-DBANK-F7, this firmware is intended to describe the STM32F7 Flash-memory dual-bank capabilities.

So indeed, CubeProgrammer could detect the dual bank mode through User Configuration OB nDBANK, which is not present in STM32H7 for example. The base address of the Flash sectors and sizes should be defined by the user in the main.h.

Second, you don't have to disconnect and connect the board to flash data. All you need to do is to check or uncheck nDBANK OB to specify the FLASH mode: single bank or dual bank and apply. Then flash the code depending on the specified FLASH mode.

Just one more thing, it is recommended to execute code from SRAM or use bootloader to avoid reading corrupted data from Flash when the memory organization is changed any access (CPU or DMAs) to Flash memory should be avoided before reprogramming.

I suggest to take a look at the RM0410 section 3.3.6 Switching from single bank to dual bank configuration for further details

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Pavel A.
Evangelist III

Thank you @F.Belaid​