px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2

Description

This module is used to initialise the IWDG peripheral.

File(s):

Enumerations

enum  px_iwdg_prescaler_t {
  PX_IWDG_PRESCALER_4 = 0 , PX_IWDG_PRESCALER_8 = 1 , PX_IWDG_PRESCALER_16 = 2 , PX_IWDG_PRESCALER_32 = 3 ,
  PX_IWDG_PRESCALER_64 = 4 , PX_IWDG_PRESCALER_128 = 5 , PX_IWDG_PRESCALER_256 = 6
}
 Independent Watchdog clock prescaler (40 kHz LSI clock source) More...
 

Functions

void px_iwdg_init (px_iwdg_prescaler_t prescaler, uint16_t reload, uint16_t window)
 Initialise Independent Watchdog. More...
 
void px_iwdg_reload_counter (void)
 Reload watchdog counter, a.k.a. More...
 

Enumeration Type Documentation

◆ px_iwdg_prescaler_t

Independent Watchdog clock prescaler (40 kHz LSI clock source)

Enumerator
PX_IWDG_PRESCALER_4 

Clock = 40 kHz / 4.

PX_IWDG_PRESCALER_8 

Clock = 40 kHz / 8.

PX_IWDG_PRESCALER_16 

Clock = 40 kHz / 16.

PX_IWDG_PRESCALER_32 

Clock = 40 kHz / 32.

PX_IWDG_PRESCALER_64 

Clock = 40 kHz / 64.

PX_IWDG_PRESCALER_128 

Clock = 40 kHz / 128.

PX_IWDG_PRESCALER_256 

Clock = 40 kHz / 256.

Definition at line 46 of file px_iwdg.h.

Function Documentation

◆ px_iwdg_init()

void px_iwdg_init ( px_iwdg_prescaler_t  prescaler,
uint16_t  reload,
uint16_t  window 
)

Initialise Independent Watchdog.

Parameters
prescalerClock prescaler. See px_iwdg_prescaler_t
reloadCounter reload value (1 to 0x0fff)
windowReload window (0 if not used; max 0x0fff)

Definition at line 40 of file px_iwdg.c.

◆ px_iwdg_reload_counter()

void px_iwdg_reload_counter ( void  )

Reload watchdog counter, a.k.a.

"patting the dog"

Definition at line 67 of file px_iwdg.c.