![]() |
iSensor-SPI-Buffer
1.15
Firmware for the iSensor-SPI-Buffer board to enable full throughput buffered data capture on Analog Devices IMUs
|
iSensor-SPI-Buffer watchdog reset timer module implementation More...
Functions | |
void | Watchdog_Feed () |
Feeds the watchdog timer. Should be called periodically from main loop. More... | |
void | Watchdog_Check_Status () |
Check if system reset from independent watch dog timeout and sets the appropriate STATUS flag. More... | |
void | Watchdog_Enable (uint32_t timeout_ms) |
Enables watch dog reset functionality. More... | |
iSensor-SPI-Buffer watchdog reset timer module implementation
Copyright (c) Analog Devices Inc, 2020 All Rights Reserved.
void Watchdog_Check_Status | ( | ) |
Check if system reset from independent watch dog timeout and sets the appropriate STATUS flag.
void Watchdog_Enable | ( | uint32_t | timeout_ms | ) |
Enables watch dog reset functionality.
timeout_ms | The watch dog reset time (in ms) |
This functions calculates the watch dog time base based on desired timeout, to give the best granularity. The STM32 independent watch dog peripheral runs on a 40KHz RC oscillator. This 40KHz clock can be divided down in range 4 - 256. The watchdog itself resets the system when the watchdog timer reaches a value of 0 (12 bit counter).
Min timeout (highest resolution): 4095 / (40KHz / 4) -> 0.410s
Max timeout: 4095 / (40KHz / 256) -> 26.2s
void Watchdog_Feed | ( | ) |
Feeds the watchdog timer. Should be called periodically from main loop.
If this function is not called within the reset period, the watchdog timer will trip and force a system reset. Default watchdog timeout is 2s, which should be significantly longer than any operation execution time in firmware.