Issue #18: Documentation of boot status flags

This commit is contained in:
Mario Hüttel 2020-09-05 19:00:01 +02:00
parent e96a710576
commit e50602611c
2 changed files with 27 additions and 1 deletions

View File

@ -26,7 +26,7 @@ In case of a CRC error or invalid entries in the error memory, the Backup RAM is
because it will no longer be possible to clear the error memory by cutting the power. because it will no longer be possible to clear the error memory by cutting the power.
On top of that, the backup memory will also contain the calibration data. On top of that, the backup memory will also contain the calibration data.
..note:: The firmware will not use the ``NOP`` entries of the error memory by default, but they will be respected by the validity checker. .. note:: The firmware will not use the ``NOP`` entries of the error memory by default, but they will be respected by the validity checker.
Partitioning and Entries Partitioning and Entries
------------------------ ------------------------
@ -57,6 +57,11 @@ The safety memory header magic is:
Boot Status Flag Entries Boot Status Flag Entries
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
The boot status flag entries are use to store system states over resets.
The flags are stored in memory using the follwoing structure:
.. doxygenstruct:: safety_memory_boot_status
Config Overrides Config Overrides
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~

View File

@ -55,8 +55,29 @@ struct safety_memory_header {
}; };
struct safety_memory_boot_status { struct safety_memory_boot_status {
/**
* @brief Reboot into the bootloader
*
* When this flag is set, the controller will load the bootloader to
* memory and execute it.
*/
uint32_t reboot_to_bootloader; uint32_t reboot_to_bootloader;
/**
* @brief Bootloader has updated the code
*
* This flag is set, if the firmware ahs been updated successfully
*/
uint32_t code_updated; uint32_t code_updated;
/**
* @brief reset_from_panic
*
* This flag is set, when entering the panic mode.
* Because the panic mode is reset by a watchdog reset,
* this flag is needed, in order to ensure, that the panic is handled correcly after
* the watchdog reset.
*/
uint32_t reset_from_panic; uint32_t reset_from_panic;
}; };