cancel
Showing results for 
Search instead for 
Did you mean: 

The symbol FLASH_OPTR_DBANK is used as an option and a register bit def

The symbol FLASH_OPTR_DBANK is used to determine the dual bank configuration in stm32g4xx_hal_flash.h, but it is also used for a register bit for the dual bank configuration (CMSIS). If this arrangement is correct, the G4 HAL library can not handle single bank configuration. Is this intentional?

EDIT

Other flash organization constants defined a bit strange, too.

For example, FLASH_PAGE_NB for number of pages is 128 for dual bank and 64 for single bank. FLASH_PAGE_SIZE is 0x800U for single bank (this is okay) while this symbol is not available for dual bank with what seems to be corresponding symbol is FLASH_PAGE_SIZE_128_BITS defined as 0x1000U which doesn't make sense in all sense.

2 REPLIES 2
Pierre.A
Associate II

I also encounter the same problem and asked to ST support.

Waiting for their answer.

Did you find a solution ?

Pierre.A
Associate II

As Far As I understand the symbol FLASH_OPTR_DBANK used in stm32g4xx_hal_flash.h reflects the Dual-bank capability of the microprocessor. Not the mode you wish to use.