HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
Loading...
Searching...
No Matches
WDG_ex.c File Reference

Extensions for WDG peripherals. More...

#include "sarmfsw.h"
#include "WDG_ex.h"
Include dependency graph for WDG_ex.c:

Functions

bool WDG_ex_get_IWDG_state (void)
 Get IWDG status.
 
bool WDG_ex_get_WWDG_state (void)
 Get IWDG status.
 
void WDG_ex_refresh_all (void)
 Refresh IWDG & WWDG.
 
void WDG_ex_refresh_IWDG (void)
 Refresh IWDG.
 
void WDG_ex_refresh_WWDG (void)
 Refresh WWDG.
 
void WDG_ex_save_cfg (void)
 Save IWDG & WWDG configuration.
 
HAL_StatusTypeDef WDG_ex_restore_cfg (void)
 Restore saved IWDG & WWDG configuration.
 
HAL_StatusTypeDef WDG_ex_set_IWDG_Period_us (IWDG_HandleTypeDef *const pIwdg, const uint32_t per)
 Set IWDG period (in us)
 
uint32_t WDG_ex_get_IWDG_Period_us (const IWDG_HandleTypeDef *const pIwdg)
 Get IWDG period (in us)
 
HAL_StatusTypeDef WDG_ex_Init (void)
 Initialize WDG_ex module and start watchdog(s)
 

Detailed Description

Extensions for WDG peripherals.

Author
SMFSW
Note
For proper sync to use state related functionalities (get and update), you shall disable call to MX_IWDG_Init and/or MX_WWDG_Init in HAL generated from ioc file, WDG_ex_Init have to be called instead at the end of your init routine.

Function Documentation

◆ WDG_ex_get_IWDG_Period_us()

uint32_t WDG_ex_get_IWDG_Period_us ( const IWDG_HandleTypeDef *const pIwdg)

Get IWDG period (in us)

Parameters
[in]pIwdg- Pointer to IWDG instance
Returns
Period (in us)
Here is the caller graph for this function:

◆ WDG_ex_get_IWDG_state()

bool WDG_ex_get_IWDG_state ( void )

Get IWDG status.

Returns
IWDG enabled state

◆ WDG_ex_get_WWDG_state()

bool WDG_ex_get_WWDG_state ( void )

Get IWDG status.

Returns
WWDG enabled state

◆ WDG_ex_Init()

HAL_StatusTypeDef WDG_ex_Init ( void )

Initialize WDG_ex module and start watchdog(s)

Returns
HAL Status
Here is the call graph for this function:

◆ WDG_ex_refresh_all()

void WDG_ex_refresh_all ( void )

Refresh IWDG & WWDG.

◆ WDG_ex_refresh_IWDG()

void WDG_ex_refresh_IWDG ( void )

Refresh IWDG.

◆ WDG_ex_refresh_WWDG()

void WDG_ex_refresh_WWDG ( void )

Refresh WWDG.

◆ WDG_ex_restore_cfg()

HAL_StatusTypeDef WDG_ex_restore_cfg ( void )

Restore saved IWDG & WWDG configuration.

Returns
HAL Status

◆ WDG_ex_save_cfg()

void WDG_ex_save_cfg ( void )

Save IWDG & WWDG configuration.

Here is the caller graph for this function:

◆ WDG_ex_set_IWDG_Period_us()

HAL_StatusTypeDef WDG_ex_set_IWDG_Period_us ( IWDG_HandleTypeDef *const pIwdg,
const uint32_t per )

Set IWDG period (in us)

Warning
125us granularity for a 32KHz clock with minimum prescaler of 4 (typical STM32 IWDG architecture)
Parameters
[in,out]pIwdg- Pointer to IWDG instance
[in]per- Period (in us)
Returns
HAL Status
Here is the caller graph for this function: