2023-01-02 03:40 PM
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?
Solved! Go to Solution.
2023-01-03 01:58 AM
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.
2023-01-03 01:58 AM
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.
2023-01-03 04:00 AM
Thank you @F.Belaid