G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference

Functions

__STATIC_INLINE void DDL_WWDT_Enable (WWDT_TypeDef *WWDTx)
 Enable Window Watchdog. The watchdog is always disabled after a reset.
__STATIC_INLINE uint32_t DDL_WWDT_IsEnabled (WWDT_TypeDef *WWDTx)
 Checks if Window Watchdog is enabled.
__STATIC_INLINE void DDL_WWDT_SetCounter (WWDT_TypeDef *WWDTx, uint32_t Counter)
 Set the Watchdog counter value to provided value (7-bits T[6:0]).
__STATIC_INLINE uint32_t DDL_WWDT_GetCounter (WWDT_TypeDef *WWDTx)
 Return current Watchdog Counter Value (7 bits counter value).
__STATIC_INLINE void DDL_WWDT_SetPrescaler (WWDT_TypeDef *WWDTx, uint32_t Prescaler)
 Set the time base of the prescaler (WDGTB).
__STATIC_INLINE uint32_t DDL_WWDT_GetPrescaler (WWDT_TypeDef *WWDTx)
 Return current Watchdog Prescaler Value.
__STATIC_INLINE void DDL_WWDT_SetWindow (WWDT_TypeDef *WWDTx, uint32_t Window)
 Set the Watchdog Window value to be compared to the downcounter (7-bits W[6:0]).
__STATIC_INLINE uint32_t DDL_WWDT_GetWindow (WWDT_TypeDef *WWDTx)
 Return current Watchdog Window Value (7 bits value).

Detailed Description

Function Documentation

◆ DDL_WWDT_Enable()

__STATIC_INLINE void DDL_WWDT_Enable ( WWDT_TypeDef * WWDTx)

Enable Window Watchdog. The watchdog is always disabled after a reset.

Note
It is enabled by setting the WDGA bit in the WWDT_CTRL register, then it cannot be disabled again except by a reset. This bit is set by software and only cleared by hardware after a reset. When WDGA = 1, the watchdog can generate a reset.
Parameters
WWDTxWWDT Instance
Return values
None

Definition at line 146 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_GetCounter()

__STATIC_INLINE uint32_t DDL_WWDT_GetCounter ( WWDT_TypeDef * WWDTx)

Return current Watchdog Counter Value (7 bits counter value).

Parameters
WWDTxWWDT Instance
Return values
7bit Watchdog Counter value

Definition at line 181 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_GetPrescaler()

__STATIC_INLINE uint32_t DDL_WWDT_GetPrescaler ( WWDT_TypeDef * WWDTx)

Return current Watchdog Prescaler Value.

Parameters
WWDTxWWDT Instance
Return values
Returnedvalue can be one of the following values:

Definition at line 212 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_GetWindow()

__STATIC_INLINE uint32_t DDL_WWDT_GetWindow ( WWDT_TypeDef * WWDTx)

Return current Watchdog Window Value (7 bits value).

Parameters
WWDTxWWDT Instance
Return values
7bit Watchdog Window value

Definition at line 242 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_IsEnabled()

__STATIC_INLINE uint32_t DDL_WWDT_IsEnabled ( WWDT_TypeDef * WWDTx)

Checks if Window Watchdog is enabled.

Parameters
WWDTxWWDT Instance
Return values
Stateof bit (1 or 0).

Definition at line 156 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_SetCounter()

__STATIC_INLINE void DDL_WWDT_SetCounter ( WWDT_TypeDef * WWDTx,
uint32_t Counter )

Set the Watchdog counter value to provided value (7-bits T[6:0]).

Note
When writing to the WWDT_CTRL register, always write 1 in the MSB b6 to avoid generating an immediate reset This counter is decremented every (4096 x 2expWDGTB) PCLK cycles A reset is produced when it rolls over from 0x40 to 0x3F (bit T6 becomes cleared) Setting the counter lower then 0x40 causes an immediate reset (if WWDT enabled)
Parameters
WWDTxWWDT Instance
Counter0..0x7F (7 bit counter value)
Return values
None

Definition at line 171 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_SetPrescaler()

__STATIC_INLINE void DDL_WWDT_SetPrescaler ( WWDT_TypeDef * WWDTx,
uint32_t Prescaler )

Set the time base of the prescaler (WDGTB).

Note
Prescaler is used to apply ratio on PCLK clock, so that Watchdog counter is decremented every (4096 x 2expWDGTB) PCLK cycles
Parameters
WWDTxWWDT Instance
PrescalerThis parameter can be one of the following values:
Return values
None

Definition at line 198 of file g32r4xx_ddl_wwdt.h.

◆ DDL_WWDT_SetWindow()

__STATIC_INLINE void DDL_WWDT_SetWindow ( WWDT_TypeDef * WWDTx,
uint32_t Window )

Set the Watchdog Window value to be compared to the downcounter (7-bits W[6:0]).

Note
This window value defines when write in the WWDT_CTRL register to program Watchdog counter is allowed. Watchdog counter value update must occur only when the counter value is lower than the Watchdog window register value. Otherwise, a MCU reset is generated if the 7-bit Watchdog counter value (in the control register) is refreshed before the downcounter has reached the watchdog window register value. Physically is possible to set the Window lower then 0x40 but it is not recommended. To generate an immediate reset, it is possible to set the Counter lower than 0x40.
Parameters
WWDTxWWDT Instance
Window0x00..0x7F (7 bit Window value)
Return values
None

Definition at line 232 of file g32r4xx_ddl_wwdt.h.