Sunday, May 20th 2018, 1:45pm UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Date of registration: Apr 8th 2015

Posts: 8

Location: Darmstadt, Germany

Occupation: Software Developer


Thursday, June 2nd 2016, 1:50pm

Which way to go to separate NOR flash into multiple volumes

Hi all,

We have a NOR-flash chip connected via SPI to the micro-controller.
We want to separate the available memory space of this chip into different volumes.
This separation is static and will never be changed.
One volume shall be mounted read-only to avoid accidentally deleting it.
A separate "log volume" shall ensure the "root file system" can not be filled up by log files.

My question is: which is the way to go?
a) Use a Master Boot Record, or
b) call FS_NOR_BM_Configure() multiple times with varying StartAddr and NumBytes, or
c) is there a better way to split a single NOR-flash into separate volumes?

Volumes might be used from different threads simultaneously.
Is there anything to be considered regarding locking of the shared resource SPI bus in scenarios a) or b)?


SEGGER - Marius

Super Moderator

Date of registration: Aug 10th 2011

Posts: 32


Monday, June 6th 2016, 1:42pm

Hello Stefan,

You can use FS_LOGVOL_Create()/FS_LOGVOL_AddDevice() functions to create
two separate volumes on the NOR flash. An example is provided in the section
"4.3.7 FS_LOGVOL_AddDevice()" of the emFile manual.

The volumes can be accessed from different tasks provided FS_OS_LOCKING
is set to 1 or 2.

Best regards,