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 WWDG peripheral.

File(s):

Enumerations

enum  px_wwdg_prescaler_t { PX_WWDG_PRESCALER_1 = 0 , PX_WWDG_PRESCALER_2 = 1 , PX_WWDG_PRESCALER_4 = 2 , PX_WWDG_PRESCALER_8 = 3 }
 Window Watchdog clock prescaler (PCLK / 4096 clock source) More...
 

Functions

void px_wwdg_init (px_wwdg_prescaler_t prescaler, uint8_t counter, uint8_t window)
 Initialise System Window Watchdog. More...
 
void px_wwdg_reload_counter (void)
 Reload watchdog counter, a.k.a. More...
 
void px_wwdg_halt (void)
 Halt watchdog by disabling peripheral clock. More...
 
void px_wwdg_resume (void)
 Resume watchdog by enabling peripheral clock. More...
 
void px_wwdg_dbg_report (void)
 Report state saved by early warning interrupt in .noinit variables. More...
 

Enumeration Type Documentation

◆ px_wwdg_prescaler_t

Window Watchdog clock prescaler (PCLK / 4096 clock source)

Enumerator
PX_WWDG_PRESCALER_1 

Clock = (PCLK / 4096) / 1.

PX_WWDG_PRESCALER_2 

Clock = (PCLK / 4096) / 2.

PX_WWDG_PRESCALER_4 

Clock = (PCLK / 4096) / 4.

PX_WWDG_PRESCALER_8 

Clock = (PCLK / 4096) / 8.

Definition at line 46 of file px_wwdg.h.

Function Documentation

◆ px_wwdg_init()

void px_wwdg_init ( px_wwdg_prescaler_t  prescaler,
uint8_t  counter,
uint8_t  window 
)

Initialise System Window Watchdog.

Parameters
prescalerClock prescaler. See px_wwdg_prescaler_t
counterReload counter value (max 0x7f)
windowReload window (0 if not used; max 0x7f)

Definition at line 118 of file px_wwdg.c.

◆ px_wwdg_reload_counter()

void px_wwdg_reload_counter ( void  )

Reload watchdog counter, a.k.a.

"patting the dog"

Definition at line 174 of file px_wwdg.c.

◆ px_wwdg_halt()

void px_wwdg_halt ( void  )

Halt watchdog by disabling peripheral clock.

Definition at line 187 of file px_wwdg.c.

◆ px_wwdg_resume()

void px_wwdg_resume ( void  )

Resume watchdog by enabling peripheral clock.

Definition at line 192 of file px_wwdg.c.

◆ px_wwdg_dbg_report()

void px_wwdg_dbg_report ( void  )

Report state saved by early warning interrupt in .noinit variables.

Definition at line 197 of file px_wwdg.c.