Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
61
of
174
This is provided in order to support the runtime-determined size usage mode, see 5.6.4.5.
5.6.4. Usage description
5.6.4.1. General
The driver supports a number of independent operations on the mass memory. Logically the
mass memory is divided into blocks and pages. There are MASSMEM_BLOCKS blocks
starting from block number 0 and MASSMEM_PAGES_PER_BLOCK pages within each
block starting from page 0.
5.6.4.2. Overview
The RTEMS driver accesses the mass memory by the reference a page number.
When writing new data into a page, the memory area must be in its reset value. If there is
data that was previously written to a page, the block where the page resides must first be
erased in order to clear the page to its reset value.
Note
that the whole block is erased, not
only the page.
It is the user application’s responsibility to make sure any data the needs to be prese
rved
after the erase block operation must first be read and rewritten after the erase block
operation, with the new page information.
5.6.4.3. Usage
The RTEMS driver must be opened before it can access the mass memory flash device.
Once opened, all provided operations can be used as described in the subchapter 5.5.2.
And, if desired, the access can be closed when not needed.
Command
Value
type
Direction Description
MASSMEM_IO_GET_SPARE_AREA_BYTES uint32_t*
out
Pointer to variable in which the available spare
area size in bytes is to be stored.