Skip to main content
Visitor II
July 7, 2019
Question

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

  • July 7, 2019
  • 2 replies
  • 1238 views

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.

    This topic has been closed for replies.

    2 replies

    Visitor II
    April 21, 2021

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

    Waiting for their answer.

    Did you find a solution ?

    Visitor II
    April 21, 2021

    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.