Skip to main content
zamek42
Associate II
November 29, 2016
Question

STM32 embedded flash as micro file system

  • November 29, 2016
  • 3 replies
  • 1452 views
Posted on November 29, 2016 at 12:43

Hi All,

I need to use an stm2f411 embedded flash as little file system. There will be about 20 small files on it. I found the uffs file system which is seems to be good for this.

I found some information in stm32 doc:

- maybe the page size is 512 byte

- there are 16Kb, 64Kb, 128Kb of sectors on it.

- I found HAL_FLASH_Program(), HAL_FLASHEx_Erase() in drivers.

But I need some information about the stm32 flash:

- is it NAND or NOR flash?

- is the page size 512B?

- uffs needs block parameters which is larger than page size. How many is it in stm32?

thx,

Zamek

#stm32f #flash
This topic has been closed for replies.

3 replies

Walid FTITI_O
Visitor II
November 30, 2016
Posted on November 30, 2016 at 14:59

Hi Zamek, 

To find these information , You would check tha datasheet relevant to the device from the ST website and check its reference manual -> Embedded Flash section.

-Hannibal-

Tesla DeLorean
Guru
November 30, 2016
Posted on November 30, 2016 at 16:57

You'd probably just want to use the 128KB blocks/sectors for consistencies sake, but the erase and write are rather slow, and will stall the processor to the point it can't handle basic real-time operations (ie Serial, USB, etc). You can run code from RAM to address this somewhat, but it doesn't speed things up.

It is ill suited to 512 byte sector file systems. You'd do better managing your own data structures, on a pair of the 16KB sectors if you can handle that.

I believe it is a NOR Flash with some hidden word wide parity/ecc

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
zamek42
zamek42Author
Associate II
December 2, 2016
Posted on December 02, 2016 at 10:05

Hi All,

Thx for  infos, that was the main missing info whether it is NAND or NOR.

Because it is NOR, I cannot use any flash file systems, I need to manage it by own code.

There was an old style flash file system for the old Psion machines, maybe I can get ideas from there.

thx a lot,

Zamek