Showing results for 
Search instead for 
Did you mean: 

Definition of Area for STM32L4 Multi-bank Flash Memory

SJ Leem
Posted on October 19, 2017 at 20:45

Edit: It seems like the real question I need to ask is 'what is the definition of a bank area?'. After reading RM0394 Section 3.5.3, I rule out my previous assumption of an area being a further division. My current understanding is that you can use either areas for the configuration of WRP, specifically from the wording '...WRP1B_STRT and WRP1B_END in FLASH_WRP1BR can be used instead (area �B� in Flash memory)'. Is this the correct interpretation?


Hi all,

I'm trying to program functions that configure the WRP of an L4 system. I have utilized HAL drivers and while most of it is intuitive, I am unsure about one property that needs to be set for the config object. 

To my understanding, WRPStartOffset and WRPEndOffset are page numbers relative to each Bank. I.e. for my environment, 256 pages of 2KBytes for each bank. What confuses me is the WRPArea property which accepts the FLASH_OB_WRP_Area type. In stm32l4xx_hal_flash.h I see that of matching types OB_WRPAREA_BANK(1/2)_AREA(A/B) are defined (the characters in parentheses are the variations). I understand (1/2) used to define the desired bank, but do not understand (A/B) areas.

My assumption is that a bank area is the whole bank space divided by 2 (i.e. for 256 pages/bank, 128 pages/area) but would like some confirmation or a source that I can refer to.

New to this type of development, so I apologize if this is blatantly clear or if there's a place to find this information. I've looked at UM1884 but cannot find that exact information.

Thanks in advance!

#flash #stm32l4 #hal