|
SmartSnippets DA1459x SDK
|
Watchdog Timer. More...
Files | |
| file | hw_watchdog.h |
| Definition of API for the Watchdog timer Low Level Driver. | |
Typedefs | |
| typedef void(* | hw_watchdog_interrupt_cb) (unsigned long *exception_args) |
| Watchdog timer interrupt callback. More... | |
Enumerations | |
| enum | HW_WDG_RESET { HW_WDG_RESET_NMI = 0, HW_WDG_RESET_RST = 1 } |
| Types of generated states if reload value is 0. More... | |
Functions | |
| __ALWAYS_RETAINED_CODE bool | hw_watchdog_freeze (void) |
| Freeze the watchdog. More... | |
| __RETAINED_CODE bool | hw_watchdog_unfreeze (void) |
| Unfreeze the watchdog. More... | |
| __STATIC_FORCEINLINE bool | hw_watchdog_check_write_busy (void) |
| Check if watchdog is busy writing the watchdog counter. | |
| __STATIC_INLINE void | hw_watchdog_write_value_ctrl (bool enable) |
| Enable/disable writing the Watchdog timer reload value. This filter prevents unintentionally setting the watchdog with a SW run-away. More... | |
| __STATIC_FORCEINLINE void | hw_watchdog_set_pos_val (uint16_t value) |
| Set positive reload value of the watchdog timer. More... | |
| __STATIC_INLINE void | hw_watchdog_set_neg_val (uint16_t value) |
| Set negative reload value of the watchdog timer. More... | |
| __STATIC_INLINE uint16_t | hw_watchdog_get_val (void) |
| Get reload value of the watchdog timer. More... | |
| __STATIC_FORCEINLINE void | hw_watchdog_gen_RST (void) |
| Generate a reset signal of the system when reload value reaches 0. More... | |
| __STATIC_FORCEINLINE void | hw_watchdog_gen_NMI (void) |
| Generate an NMI when reload value reaches 0. More... | |
| __STATIC_INLINE void | hw_watchdog_freeze_ctrl (bool enable) |
| Enable/disable Watchdog freeze functionality. More... | |
| void | hw_watchdog_register_int (hw_watchdog_interrupt_cb handler) |
| Register an interrupt handler. More... | |
| __RETAINED_CODE void | hw_watchdog_unregister_int (void) |
| Unregister an interrupt handler. More... | |
| __RETAINED_CODE void | hw_watchdog_handle_int (unsigned long *hardfault_args) |
| Handle NMI interrupt. More... | |
| HW_WDG_RESET | hw_watchdog_is_irq_or_rst_gen (void) |
| Check what is generated when watchdog reaches 0 value. More... | |
Variables | |
| volatile uint32_t | nmi_event_data [9] |
| Holds the stack contents when an NMI occurs. More... | |
Watchdog Timer.
| typedef void(* hw_watchdog_interrupt_cb) (unsigned long *exception_args) |
Watchdog timer interrupt callback.
| [in] | hardfault_args | pointer to call stack |
| enum HW_WDG_RESET |
Types of generated states if reload value is 0.
Generate NMI (non-maskable interrupt) or RST (reset of the system)
| __ALWAYS_RETAINED_CODE bool hw_watchdog_freeze | ( | void | ) |
Freeze the watchdog.
| __STATIC_INLINE void hw_watchdog_freeze_ctrl | ( | bool | enable | ) |
Enable/disable Watchdog freeze functionality.
| [in] | enable | true = Watchdog timer can not be frozen when NMI_RST=0. false = Watchdog timer can be frozen/resumed when NMI_RST=0 |
| __STATIC_FORCEINLINE void hw_watchdog_gen_NMI | ( | void | ) |
Generate an NMI when reload value reaches 0.
| __STATIC_FORCEINLINE void hw_watchdog_gen_RST | ( | void | ) |
Generate a reset signal of the system when reload value reaches 0.
| __STATIC_INLINE uint16_t hw_watchdog_get_val | ( | void | ) |
Get reload value of the watchdog timer.
| __RETAINED_CODE void hw_watchdog_handle_int | ( | unsigned long * | hardfault_args | ) |
Handle NMI interrupt.
| [in] | hardfault_args | pointer to call stack |
| HW_WDG_RESET hw_watchdog_is_irq_or_rst_gen | ( | void | ) |
Check what is generated when watchdog reaches 0 value.
If it is NMI (interrupt) or RST (system/wdog reset).
| void hw_watchdog_register_int | ( | hw_watchdog_interrupt_cb | handler | ) |
Register an interrupt handler.
| [in] | handler | function pointer to handler to call when an interrupt occurs |
| __STATIC_INLINE void hw_watchdog_set_neg_val | ( | uint16_t | value | ) |
Set negative reload value of the watchdog timer.
| [in] | value | reload value from 0x1FFF to 0x00 |
| __STATIC_FORCEINLINE void hw_watchdog_set_pos_val | ( | uint16_t | value | ) |
Set positive reload value of the watchdog timer.
| [in] | value | reload value for 13 bits down counter in the PD_AON power domain which is running on either a 10,24 ms clock or a 20,5 ms clock period and can operate for 84 sec or 3 minutes (depending on the clock). |
| __RETAINED_CODE bool hw_watchdog_unfreeze | ( | void | ) |
Unfreeze the watchdog.
| __RETAINED_CODE void hw_watchdog_unregister_int | ( | void | ) |
Unregister an interrupt handler.
| __STATIC_INLINE void hw_watchdog_write_value_ctrl | ( | bool | enable | ) |
Enable/disable writing the Watchdog timer reload value. This filter prevents unintentionally setting the watchdog with a SW run-away.
| [in] | enable | true = write enable for Watchdog reload value false = write disable for Watchdog reload value |
| volatile uint32_t nmi_event_data[9] |
Holds the stack contents when an NMI occurs.
The stack contents are copied at this variable when an NMI occurs. The first position is marked with a special "flag" (0xDEADBEEF) to indicate that the data that follow are valid.
1.8.16