![]() |
![]() |
|
MSPM0G1X0X_G3X0X Driver Library
1.10.01.05
|
Enumerations | |
| enum | DL_WWDT_CLOCK_DIVIDE { DL_WWDT_CLOCK_DIVIDE_1 = 0x00000000, DL_WWDT_CLOCK_DIVIDE_2 = 0x00000001, DL_WWDT_CLOCK_DIVIDE_3 = 0x00000002, DL_WWDT_CLOCK_DIVIDE_4 = 0x00000003, DL_WWDT_CLOCK_DIVIDE_5 = 0x00000004, DL_WWDT_CLOCK_DIVIDE_6 = 0x00000005, DL_WWDT_CLOCK_DIVIDE_7 = 0x00000006, DL_WWDT_CLOCK_DIVIDE_8 = 0x00000007 } |
| enum | DL_WWDT_WINDOW { DL_WWDT_WINDOW0 = WWDT_WWDTCTL1_WINSEL_WIN0, DL_WWDT_WINDOW1 = WWDT_WWDTCTL1_WINSEL_WIN1 } |
| enum | DL_WWDT_WINDOW_PERIOD { DL_WWDT_WINDOW_PERIOD_0 = WWDT_WWDTCTL0_WINDOW0_SIZE_0, DL_WWDT_WINDOW_PERIOD_12 = WWDT_WWDTCTL0_WINDOW0_SIZE_12, DL_WWDT_WINDOW_PERIOD_18 = WWDT_WWDTCTL0_WINDOW0_SIZE_18, DL_WWDT_WINDOW_PERIOD_25 = WWDT_WWDTCTL0_WINDOW0_SIZE_25, DL_WWDT_WINDOW_PERIOD_50 = WWDT_WWDTCTL0_WINDOW0_SIZE_50, DL_WWDT_WINDOW_PERIOD_75 = WWDT_WWDTCTL0_WINDOW0_SIZE_75, DL_WWDT_WINDOW_PERIOD_81 = WWDT_WWDTCTL0_WINDOW0_SIZE_81, DL_WWDT_WINDOW_PERIOD_87 = WWDT_WWDTCTL0_WINDOW0_SIZE_87 } |
| enum | DL_WWDT_TIMER_PERIOD { DL_WWDT_TIMER_PERIOD_6_BITS = WWDT_WWDTCTL0_PER_EN_6, DL_WWDT_TIMER_PERIOD_8_BITS = WWDT_WWDTCTL0_PER_EN_8, DL_WWDT_TIMER_PERIOD_10_BITS = WWDT_WWDTCTL0_PER_EN_10, DL_WWDT_TIMER_PERIOD_12_BITS = WWDT_WWDTCTL0_PER_EN_12, DL_WWDT_TIMER_PERIOD_15_BITS = WWDT_WWDTCTL0_PER_EN_15, DL_WWDT_TIMER_PERIOD_18_BITS = WWDT_WWDTCTL0_PER_EN_18, DL_WWDT_TIMER_PERIOD_21_BITS = WWDT_WWDTCTL0_PER_EN_21, DL_WWDT_TIMER_PERIOD_25_BITS = WWDT_WWDTCTL0_PER_EN_25 } |
| enum | DL_WWDT_SLEEP_MODE { DL_WWDT_STOP_IN_SLEEP = WWDT_WWDTCTL0_STISM_STOP, DL_WWDT_RUN_IN_SLEEP = WWDT_WWDTCTL0_STISM_CONT } |
| enum | DL_WWDT_MODE { DL_WWDT_WATCHDOG_MODE = 0x0, DL_WWDT_INTERVAL_TIMER_MODE = WWDT_WWDTCTL0_MODE_INTERVAL } |
| enum | DL_WWDT_IIDX { DL_WWDT_IIDX_NO_INT = WWDT_IIDX_STAT_NO_INTR, DL_WWDT_IIDX_INTERVAL_TIMER = WWDT_IIDX_STAT_INTTIM } |
Functions | |
| __STATIC_INLINE void | DL_WWDT_initWatchdogMode (WWDT_Regs *wwdt, DL_WWDT_CLOCK_DIVIDE divider, DL_WWDT_TIMER_PERIOD period, DL_WWDT_SLEEP_MODE sleepMode, DL_WWDT_WINDOW_PERIOD window0ClosedPeriod, DL_WWDT_WINDOW_PERIOD window1ClosedPeriod) |
| Initializes the Window Watchdog Timer in watchdog mode. More... | |
| __STATIC_INLINE void | DL_WWDT_initIntervalTimerMode (WWDT_Regs *wwdt, DL_WWDT_CLOCK_DIVIDE divider, DL_WWDT_TIMER_PERIOD period, DL_WWDT_SLEEP_MODE sleepMode) |
| Initializes the Window Watchdog Timer in interval timer mode. More... | |
| __STATIC_INLINE void | DL_WWDT_enablePower (WWDT_Regs *wwdt) |
| Enables power on WWDT module. More... | |
| __STATIC_INLINE void | DL_WWDT_disablePower (WWDT_Regs *wwdt) |
| Disables power on wwdt module. More... | |
| __STATIC_INLINE bool | DL_WWDT_isPowerEnabled (WWDT_Regs *wwdt) |
| Returns if power on wwdt module. More... | |
| __STATIC_INLINE void | DL_WWDT_reset (WWDT_Regs *wwdt) |
| Resets wwdt peripheral. More... | |
| __STATIC_INLINE bool | DL_WWDT_isReset (WWDT_Regs *wwdt) |
| Returns if wwdt peripheral was reset. More... | |
| __STATIC_INLINE void | DL_WWDT_restart (WWDT_Regs *wwdt) |
| Restarts the Window Watchdog. More... | |
| __STATIC_INLINE bool | DL_WWDT_isRunning (WWDT_Regs *wwdt) |
| Checks if the Window Watchdog Timer is actively running. More... | |
| __STATIC_INLINE void | DL_WWDT_setActiveWindow (WWDT_Regs *wwdt, DL_WWDT_WINDOW window) |
| Set the active window being used. More... | |
| __STATIC_INLINE DL_WWDT_WINDOW | DL_WWDT_getActiveWindow (WWDT_Regs *wwdt) |
| Get the active window being used. More... | |
| __STATIC_INLINE DL_WWDT_SLEEP_MODE | DL_WWDT_getSleepMode (WWDT_Regs *wwdt) |
| Get the sleep mode being used. More... | |
| __STATIC_INLINE DL_WWDT_MODE | DL_WWDT_getMode (WWDT_Regs *wwdt) |
| Get the mode the watchdog is running in. More... | |
| __STATIC_INLINE DL_WWDT_WINDOW_PERIOD | DL_WWDT_getWindowPeriod (WWDT_Regs *wwdt, DL_WWDT_WINDOW window) |
| Get the window closed percentage for a watchdog window. More... | |
| __STATIC_INLINE DL_WWDT_TIMER_PERIOD | DL_WWDT_getTimerPeriod (WWDT_Regs *wwdt) |
| Get the timer period for the watchdog. More... | |
| __STATIC_INLINE DL_WWDT_CLOCK_DIVIDE | DL_WWDT_getClockDivider (WWDT_Regs *wwdt) |
| Get the clock divider for the watchdog. More... | |
| __STATIC_INLINE void | DL_WWDT_enableInterrupt (WWDT_Regs *wwdt) |
| Enable WWDT interrupt. More... | |
| __STATIC_INLINE void | DL_WWDT_disableInterrupt (WWDT_Regs *wwdt) |
| Disable WWDT interrupt. More... | |
| __STATIC_INLINE bool | DL_WWDT_isInterruptEnabled (WWDT_Regs *wwdt) |
| Check if WWDT interrupt is enabled. More... | |
| __STATIC_INLINE bool | DL_WWDT_getEnabledInterruptStatus (WWDT_Regs *wwdt) |
| Check interrupt flag of enabled WWDT interrupt. More... | |
| __STATIC_INLINE uint32_t | DL_WWDT_getRawInterruptStatus (WWDT_Regs *wwdt) |
| Check interrupt flag of any WWDT interrupt. More... | |
| __STATIC_INLINE DL_WWDT_IIDX | DL_WWDT_getPendingInterrupt (WWDT_Regs *wwdt) |
| Get highest priority pending WWDT interrupt. More... | |
| __STATIC_INLINE void | DL_WWDT_clearInterruptStatus (WWDT_Regs *wwdt) |
| Clear pending WWDT interrupt. More... | |
The Window Watchdog Timer Driver Library allows full configuration of the MSPM0 WWDT module. The window watchdog timer (WWDT) supervises code execution. If the application software does not successfully reset the window watchdog within the programmed open time window, the window watchdog generates a SYSRST.
| enum DL_WWDT_CLOCK_DIVIDE |
| enum DL_WWDT_WINDOW |
| enum DL_WWDT_TIMER_PERIOD |
| enum DL_WWDT_SLEEP_MODE |
| enum DL_WWDT_MODE |
| enum DL_WWDT_IIDX |
| __STATIC_INLINE void DL_WWDT_initWatchdogMode | ( | WWDT_Regs * | wwdt, |
| DL_WWDT_CLOCK_DIVIDE | divider, | ||
| DL_WWDT_TIMER_PERIOD | period, | ||
| DL_WWDT_SLEEP_MODE | sleepMode, | ||
| DL_WWDT_WINDOW_PERIOD | window0ClosedPeriod, | ||
| DL_WWDT_WINDOW_PERIOD | window1ClosedPeriod | ||
| ) |
Initializes the Window Watchdog Timer in watchdog mode.
While in watchdog mode, the Window Watchdog Timer must be serviced periodically or the device will be reset. After calling this initialization API the watchdog will automatically start running with whatever window is currently selected. See DL_WWDT_setActiveWindow for setting the active window, this is typically window 0 upon startup.
Once running, the watchdog will need to be restarted periodically with DL_WWDT_restart.
The watchdog can only be initialized once, so this API can only be called once, and you may not later call DL_WWDT_initIntervalTimerMode.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| [in] | divider | Clock divider for the timer. One of DL_WWDT_CLOCK_DIVIDE. |
| [in] | period | Period for the timer. One of DL_WWDT_TIMER_PERIOD. |
| [in] | sleepMode | Enable/disable the timer running in sleep mode. One of DL_WWDT_SLEEP_MODE. |
| [in] | window0ClosedPeriod | The percentage of the total period that reset window 0 should be closed. One of DL_WWDT_WINDOW_PERIOD. |
| [in] | window1ClosedPeriod | The percentage of the total period that reset window 1 should be closed. One of DL_WWDT_WINDOW_PERIOD. |
| __STATIC_INLINE void DL_WWDT_initIntervalTimerMode | ( | WWDT_Regs * | wwdt, |
| DL_WWDT_CLOCK_DIVIDE | divider, | ||
| DL_WWDT_TIMER_PERIOD | period, | ||
| DL_WWDT_SLEEP_MODE | sleepMode | ||
| ) |
Initializes the Window Watchdog Timer in interval timer mode.
The Window Watchdog Timer can be used as a simple interval timer if you do not need watchdog/reset functionality. After calling this initialization API the timer will automatically start running and start interrupting periodically.
The WWDT can only be initialized once, so this API can only be called once, and you may not later call DL_WWDT_initWatchdogMode.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| [in] | divider | Clock divider for the timer. One of DL_WWDT_CLOCK_DIVIDE. |
| [in] | period | Period for the timer. One of DL_WWDT_TIMER_PERIOD. |
| [in] | sleepMode | Enable/disable the timer running in sleep mode. One of DL_WWDT_SLEEP_MODE. |
| __STATIC_INLINE void DL_WWDT_enablePower | ( | WWDT_Regs * | wwdt | ) |
Enables power on WWDT module.
| wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE void DL_WWDT_disablePower | ( | WWDT_Regs * | wwdt | ) |
Disables power on wwdt module.
| wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE bool DL_WWDT_isPowerEnabled | ( | WWDT_Regs * | wwdt | ) |
Returns if power on wwdt module.
| wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE void DL_WWDT_reset | ( | WWDT_Regs * | wwdt | ) |
Resets wwdt peripheral.
| wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE bool DL_WWDT_isReset | ( | WWDT_Regs * | wwdt | ) |
Returns if wwdt peripheral was reset.
| wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE void DL_WWDT_restart | ( | WWDT_Regs * | wwdt | ) |
Restarts the Window Watchdog.
When the Window Watchdog Timer is in watchdog mode it must be periodically serviced to avoid a hardware reset. This API must be called after the closed window of the watchdog has passed but before the watchdog resets the device.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| __STATIC_INLINE bool DL_WWDT_isRunning | ( | WWDT_Regs * | wwdt | ) |
Checks if the Window Watchdog Timer is actively running.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| true | The Window Watchdog Timer is running |
| false | The Window Watchdog Timer is not running |
| __STATIC_INLINE void DL_WWDT_setActiveWindow | ( | WWDT_Regs * | wwdt, |
| DL_WWDT_WINDOW | window | ||
| ) |
Set the active window being used.
The Window Watchdog Timer module allows you to switch between two different configured windows. This allows you to configure the watchdog with two different window sizes and switch between them during your application.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| [in] | window | The window to set as active. One of DL_WWDT_WINDOW. |
| __STATIC_INLINE DL_WWDT_WINDOW DL_WWDT_getActiveWindow | ( | WWDT_Regs * | wwdt | ) |
Get the active window being used.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| One | of DL_WWDT_WINDOW |
| __STATIC_INLINE DL_WWDT_SLEEP_MODE DL_WWDT_getSleepMode | ( | WWDT_Regs * | wwdt | ) |
Get the sleep mode being used.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| One | of DL_WWDT_SLEEP_MODE |
| __STATIC_INLINE DL_WWDT_MODE DL_WWDT_getMode | ( | WWDT_Regs * | wwdt | ) |
Get the mode the watchdog is running in.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| One | of DL_WWDT_MODE |
| __STATIC_INLINE DL_WWDT_WINDOW_PERIOD DL_WWDT_getWindowPeriod | ( | WWDT_Regs * | wwdt, |
| DL_WWDT_WINDOW | window | ||
| ) |
Get the window closed percentage for a watchdog window.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| [in] | window | The window to get the closed window percentage of. One of DL_WWDT_WINDOW. |
| One | of DL_WWDT_WINDOW_PERIOD |
References DL_WWDT_WINDOW0.
| __STATIC_INLINE DL_WWDT_TIMER_PERIOD DL_WWDT_getTimerPeriod | ( | WWDT_Regs * | wwdt | ) |
Get the timer period for the watchdog.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| One | of DL_WWDT_TIMER_PERIOD |
| __STATIC_INLINE DL_WWDT_CLOCK_DIVIDE DL_WWDT_getClockDivider | ( | WWDT_Regs * | wwdt | ) |
Get the clock divider for the watchdog.
| [in] | wwdt | Pointer to the register overlay for peripheral |
| One | of DL_WWDT_CLOCK_DIVIDE |
| __STATIC_INLINE void DL_WWDT_enableInterrupt | ( | WWDT_Regs * | wwdt | ) |
Enable WWDT interrupt.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE void DL_WWDT_disableInterrupt | ( | WWDT_Regs * | wwdt | ) |
Disable WWDT interrupt.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| __STATIC_INLINE bool DL_WWDT_isInterruptEnabled | ( | WWDT_Regs * | wwdt | ) |
Check if WWDT interrupt is enabled.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| true | The WWDT interrupt is enabled |
| false | The WWDT interrupt is disabled |
| __STATIC_INLINE bool DL_WWDT_getEnabledInterruptStatus | ( | WWDT_Regs * | wwdt | ) |
Check interrupt flag of enabled WWDT interrupt.
Checks if the WWDT interrupt that was previously enabled is pending.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| true | The WWDT interrupt is pending |
| false | The WWDT interrupt is not pending |
| __STATIC_INLINE uint32_t DL_WWDT_getRawInterruptStatus | ( | WWDT_Regs * | wwdt | ) |
Check interrupt flag of any WWDT interrupt.
Checks if the WWDT interrupt is pending. Interrupt does not have to be previously enabled.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| true | The WWDT interrupt is pending |
| false | The WWDT interrupt is not pending |
| __STATIC_INLINE DL_WWDT_IIDX DL_WWDT_getPendingInterrupt | ( | WWDT_Regs * | wwdt | ) |
Get highest priority pending WWDT interrupt.
Checks if any of the WWDT interrupts are pending. Interrupts do not have to be previously enabled.
| [in] | wwdt | Pointer to the register overlay for the peripheral |
| One | of DL_WWDT_IIDX |
| __STATIC_INLINE void DL_WWDT_clearInterruptStatus | ( | WWDT_Regs * | wwdt | ) |
Clear pending WWDT interrupt.
| [in] | wwdt | Pointer to the register overlay for the peripheral |