Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
138
of
174
RMAP reply status (if a reply is requested):
Table 7-63: UARTCommand status codes
Status code
Description
0
Success.
EINVAL
The driver for the UART device has not been
initialized.
EIO
I/O error. The UARTdevice cannot be accessed
7.12.4.19. MMData
Reads or writes data from/to a partition.
7.12.4.19.1. Read
The address given in the RMAP command defines the starting byte address of the read and
the RMAP data size determines the length of the read in bytes.
If no data is available at the starting address an error will be reported. If less than the
requested data is available, a short read will be returned with an RMAP error status
indication. If read errors occur based on uncorrectable read errors, the data will be returned
along with an RMAP error status indication.
Reads which pass the end of the partition logical address space will automatically wrap.
7.12.4.19.2. Write
Writes to direct partitions needs to specify the starting address and the size via the RMAP
address and RMAP data size, the size needs to be a multiple of the page size (16 kbytes). If
the write would overwrite existing data or write at an invalid location, an RMAP error status
will be reported and no data will be written.
Writes to continuous or circular partitions needs to specify the size via the RMAP data size,
and must indicate use of the write pointer by setting the address to 0.
Writes which pass the end of the partition logical address space will automatically wrap.
For direct and continuous partitions, if bad blocks occur during a write which causes
available blocks to run out, the remainder of the write will be discarded and a pending copy
operation will be set. In order to avoid data loss, freeing of enough data in order to provide
two new unused blocks should be performed as soon as possible, which will allow the copy
operation to be retried. Confirmation of the success of the copy operation should be done by
verifying that the available space is equal to one block, otherwise the freeing and copy
success confirmation procedure should be repeated. For circular partitions, the copy retrying
is taken care of automatically.
The amount of data that was written and the amount of data that was discarded in case of a
write causing available blocks to run out on direct or continuous partitions can be found by
examining the data ranges.
Writing to a circular mode partition that is being downloaded is not allowed.