Skip to main content
CLee.7
Associate
April 2, 2020
Question

What is the relationship between Sector and Page of STM32 MCU Internal Flash Memory?

  • April 2, 2020
  • 4 replies
  • 5230 views

Hello guys, I'm using STM32L433RC MCU and I'm developing IAP Bootloader and DFU routine.

I'm stuck in Flash memory sturcture of STM32L4 because the stm32l4 Reference manual(RM0394) shows there are 2Kbytes pages in Flash main memory(3.3.1 Flash memory organization). I want to use DfuSe demo PC application, and CubeMX & DfuSe demo app require "FLASH_DESC_STR" such as "@Internal Flash  /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg,04*016Kg,01*064Kg,07*128Kg". (This string is genereated by CubeMX)

I think it is an information about sectors of internal flash memory, but i cannot find information about flash memory sectors in RM0394 Ref manual.

So I am asking, what is a flash memory sector? Is it concept of just defined by each programmer? Or strictly defined by manufacture(ST Micro)? What is the relationship between Sector and Page?

This topic has been closed for replies.

4 replies

berendi
Principal
April 2, 2020

The nomenclature is a mess not consistent between different products.

Some series have pages, some call the same thing sectors.

There are ones that have both, then the page might be the unit of erase, and the sector might be the unit of write protection.

Then some have banks too.

CLee.7
CLee.7Author
Associate
April 4, 2020

Thanks for answer!

Then, depending on the product, it is called Sector, Page, but is the concept itself the same?

Tesla DeLorean
Guru
April 4, 2020

Does seem a mess and more similar to an F4 part which has non uniform blocks.

The L4 has smaller uniform block sizes

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User
April 5, 2020

> So I am asking, what is a flash memory sector?

A more common name for this is "erase block".

As you have found, some STM32s have erase blocks of several different sizes - this is unusual (call it mess or otherwise).

Then there's write granularity (aka parallelism): 1, 2, 4 bytes etc. at once. This one depends on power available for write and erase operations.

The less is the operating voltage the less is this power and less bytes that can be written in one hit.

At the Vcc that gives maximum performance (found in the data sheet), you usually can write maximum bytes at once.

> i cannot find information about flash memory sectors in RM0394 Ref manual.

For every STM32 model you usually need at least two documents: RM and the datasheet (DS).

The latter contains most specific details, including what you're asking for.

RMs are more general.

-- pa