iSensor-SPI-Buffer  1.15
Firmware for the iSensor-SPI-Buffer board to enable full throughput buffered data capture on Analog Devices IMUs
flash.h
Go to the documentation of this file.
1 
11 #ifndef INC_FLASH_H_
12 #define INC_FLASH_H_
13 
14 /* Header includes require for prototypes */
15 #include <stdint.h>
16 
17 /* Public function prototypes */
18 
19 /* @cond DOXYGEN_IGNORE */
20 void Flash_Update();
23 void Flash_Log_Fault(uint32_t faultCode);
25 /* @endcond */
26 
28 #define FLASH_REG_ADDR 0x08040000
29 
31 #define FLASH_ERROR_ADDR 0x0803F800
32 
33 /* Error codes stored in flash */
34 
36 #define ERROR_NONE 0
37 
39 #define ERROR_INIT (1 << 0)
40 
42 #define ERROR_HARDFAULT (1 << 1)
43 
45 #define ERROR_MEM (1 << 2)
46 
48 #define ERROR_BUS (1 << 3)
49 
51 #define ERROR_USAGE (1 << 4)
52 
53 #endif /* INC_FLASH_H_ */
Flash_Fault_Log_Init
void Flash_Fault_Log_Init()
Initialize flash error logging.
Definition: flash.c:221
reg.h
Header file for iSensor-SPI-Buffer register interfacing module.
Flash_Log_Fault
void Flash_Log_Fault(uint32_t faultCode)
Stores an error code to flash memory.
Definition: flash.c:173
Flash_Check_Logged_Fault
void Flash_Check_Logged_Fault()
Checks for error codes which may have been logged to flash, and sets the status register bit.
Definition: flash.c:142
Flash_Update
void Flash_Update()
Flash update command handler.
Definition: flash.c:29
PrepareRegsForFlash
static void PrepareRegsForFlash()
Clears all non-volatile registers in RAM and updates reg signature.
Definition: flash.c:254
CalcRegSig
static uint16_t CalcRegSig(uint16_t *regs, uint32_t count)
Calculate a signature of a block of RAM. Used for verifying flash memory contents.
Definition: flash.c:238
Reg_Update_Identifiers
void Reg_Update_Identifiers()
Load SN and date code registers to SRAM.
Definition: reg.c:139
ERROR_NONE
#define ERROR_NONE
Definition: flash.h:36
Flash_Load_Registers
void Flash_Load_Registers()
Load register values from flash memory to SRAM.
Definition: flash.c:96
FLASH_REG_ADDR
#define FLASH_REG_ADDR
Definition: flash.h:28
FLASH_ERROR_ADDR
#define FLASH_ERROR_ADDR
Definition: flash.h:31
flash.h
Header file for iSensor-SPI-Buffer flash memory interfacing functions.