FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
midware_memory_manager.h
Go to the documentation of this file.
1
28#ifndef MIDWARE_MEMORY_MANAGER_H
29#define MIDWARE_MEMORY_MANAGER_H
30
31// Standard Library Includes
32#include <stdbool.h>
33#include <stdint.h>
34
35// Framework Includes
36#include <define_error_flags.h>
37
58
83
102
114
126
138
150
162
174
186
198
214
226
238
250
266
278
290
303
323errFlag_t MW_SetRamStackLimit(uint16_t splimAddr, bool lockEnable);
324
346void MW_StorePersistentFlag(persistentFlag_t flagType, bool flag);
347
373void MW_StorePersistentVal(persistentVal_t valueType, uint8_t value);
374
389
401uint8_t MW_GetPersistentVal(persistentVal_t valueType);
402
420
434
442void MW_ClearPersistentFlags(void);
443
453void MW_ClearPersistentVals(void);
454
455#endif // MIDWARE_MEMORY_MANAGER_H
Defines error flag type for indicating detected errors in Middleware services.
errFlag_t
Defines the error flag used by Middleware services to indicate error detection.
void MW_ClearPersistentVals(void)
Clears all stored persistent values in GPR.
void MW_StorePersistentVal(persistentVal_t valueType, uint8_t value)
Stores a value in General Purpose Registers (GPR) for perserving data between resets.
errFlag_t MW_SetRamStackLimit(uint16_t splimAddr, bool lockEnable)
Sets the Stack Pointer Limit value and optionally locks the value to prevent modification.
persistentVal_t
Enum for persistent values used to store data between non-POR/BOR device resets.
errFlag_t MW_GetClearRamParityError(void)
Reads and clears the flag indicating a bus parity error detected in the RAM controller.
errFlag_t MW_GetClearNvmEepromEcc2Error(void)
Reads and clears the flag indicating an ECC multi-bit error in EEPROM.
errFlag_t MW_GetClearNvmFlashEcc1Error(void)
Reads and clears the flag indicating a ECC single-bit error in Flash.
void MW_StorePersistentFlag(persistentFlag_t flagType, bool flag)
Stores two redundant boolean flags in General Purpose Registers (GPR) for perserving data between res...
bool MW_GetPersistentFlag(persistentFlag_t flagType)
Reads two redundant bits for each boolean flags in General Purpose Registers (GPR) that is stored for...
bool MW_IsPersistentFlagsCorrupt(void)
Compares two redundant bits for each boolean flags in General Purpose Registers (GPR) and checks if a...
errFlag_t MW_GetClearCpuDataParityError(void)
Reads and clears the flag indicating a data bus parity error in the CPU.
persistentFlag_t
Enum for persistent flags used to store data between non-POR/BOR device resets.
errFlag_t MW_GetClearNvmEccCompError(void)
Reads and clears the flag indicating a ECC comparator error in the NVM controller.
errFlag_t MW_SetNvmEccAllOnes(eccAllOnes_t config)
Sets ECC all Ones (ECCALL1) scheme.
void MW_ClearPersistentFlags(void)
Clears all stored persistent flags in GPR.
errFlag_t MW_GetClearCpuInstrParityError(void)
Reads and clears the flag indicating a instruction bus parity error in the CPU.
uint8_t MW_GetPersistentVal(persistentVal_t valueType)
Reads a value in General Purpose Registers (GPR) that is stored for preserving data between resets.
bool MW_IsPersistentValsCorrupt(void)
Checks if any of the stored persistent values are corrupted.
eccAllOnes_t
Type defines for available "ECC all ones" (ECCALL1) options.
errFlag_t MW_GetClearNvmEepromEcc1Error(void)
Reads and clears the flag indicating an ECC single-bit error in EEPROM.
errFlag_t MW_GetClearNvmParityError(void)
Reads and clears the flag indicating a bus parity error detected in the NVM controller.
errFlag_t MW_GetClearNvmFlashEcc2Error(void)
Reads and clears the flag indicating a ECC multi-bit error in Flash.
errFlag_t MW_GetClearCpuOpcodeError(void)
Reads and clears the flag indicating an illegal opcode error in the CPU.
errFlag_t MW_GetClearRamStackError(void)
Reads and clears the flag indicating a stack pointer limit error in SRAM.
errFlag_t MW_GetClearRamEccCompError(void)
Reads and clears the flag indicating a ECC comparator error in the RAM controller.
errFlag_t MW_GetClearRamEcc1Error(void)
Reads and clears the flag indicating an ECC single-bit error in SRAM.
errFlag_t MW_GetClearBusError(void)
Reads and clears the flag indicating an error in the Bus Matrix.
errFlag_t MW_GetClearRamEcc2Error(void)
Reads and clears the flag indicating an ECC multi-bit error in SRAM.
@ PVAL_RESET_REASON
@ PVAL_ERRINJ_REASON
@ PVAL_ERRID_REASON
@ PFLAG_WDT_INJ_FAULT
@ PFLAG_ERRINJ_ONGOING
@ PFLAG_IO_FLOAT_FAULT
@ PFLAG_CPU_INJ_FAULT
@ PFLAG_SWDT_INJ_FAULT
@ ECC_ALL_ONES_DATA2
@ ECC_ALL_ONES_ALL
@ ECC_ALL_ONES_NONE
@ ECC_ALL_ONES_DATA1