STM32L4xx_HAL_Driver  1.14.0

IO operation functions. More...

Functions

HAL_StatusTypeDef HAL_WWDG_Refresh (WWDG_HandleTypeDef *hwwdg)
 Refresh the WWDG. More...
 
void HAL_WWDG_IRQHandler (WWDG_HandleTypeDef *hwwdg)
 Handle WWDG interrupt request. More...
 
void HAL_WWDG_EarlyWakeupCallback (WWDG_HandleTypeDef *hwwdg)
 WWDG Early Wakeup callback. More...
 

Detailed Description

IO operation functions.

  ==============================================================================
                      ##### IO operation functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to:
    (+) Refresh the WWDG.
    (+) Handle WWDG interrupt request and associated function callback.

Function Documentation

◆ HAL_WWDG_EarlyWakeupCallback()

__weak void HAL_WWDG_EarlyWakeupCallback ( WWDG_HandleTypeDef hwwdg)

WWDG Early Wakeup callback.

Parameters
hwwdgpointer to a WWDG_HandleTypeDef structure that contains the configuration information for the specified WWDG module.
Return values
None

Definition at line 382 of file stm32l4xx_hal_wwdg.c.

383 {
384  /* Prevent unused argument(s) compilation warning */
385  UNUSED(hwwdg);
386 
387  /* NOTE: This function should not be modified, when the callback is needed,
388  the HAL_WWDG_EarlyWakeupCallback could be implemented in the user file
389  */
390 }

◆ HAL_WWDG_IRQHandler()

void HAL_WWDG_IRQHandler ( WWDG_HandleTypeDef hwwdg)

Handle WWDG interrupt request.

Note
The Early Wakeup Interrupt (EWI) can be used if specific safety operations or data logging must be performed before the actual reset is generated. The EWI interrupt is enabled by calling HAL_WWDG_Init function with EWIMode set to WWDG_EWI_ENABLE. When the downcounter reaches the value 0x40, and EWI interrupt is generated and the corresponding Interrupt Service Routine (ISR) can be used to trigger specific actions (such as communications or data logging), before resetting the device.
Parameters
hwwdgpointer to a WWDG_HandleTypeDef structure that contains the configuration information for the specified WWDG module.
Return values
None

Definition at line 353 of file stm32l4xx_hal_wwdg.c.

354 {
355  /* Check if Early Wakeup Interrupt is enable */
356  if (__HAL_WWDG_GET_IT_SOURCE(hwwdg, WWDG_IT_EWI) != RESET)
357  {
358  /* Check if WWDG Early Wakeup Interrupt occurred */
359  if (__HAL_WWDG_GET_FLAG(hwwdg, WWDG_FLAG_EWIF) != RESET)
360  {
361  /* Clear the WWDG Early Wakeup flag */
362  __HAL_WWDG_CLEAR_FLAG(hwwdg, WWDG_FLAG_EWIF);
363 
364 #if (USE_HAL_WWDG_REGISTER_CALLBACKS == 1)
365  /* Early Wakeup registered callback */
366  hwwdg->EwiCallback(hwwdg);
367 #else
368  /* Early Wakeup callback */
370 #endif
371  }
372  }
373 }
void(* EwiCallback)(struct __WWDG_HandleTypeDef *hwwdg)
void HAL_WWDG_EarlyWakeupCallback(WWDG_HandleTypeDef *hwwdg)
WWDG Early Wakeup callback.

◆ HAL_WWDG_Refresh()

HAL_StatusTypeDef HAL_WWDG_Refresh ( WWDG_HandleTypeDef hwwdg)

Refresh the WWDG.

Parameters
hwwdgpointer to a WWDG_HandleTypeDef structure that contains the configuration information for the specified WWDG module.
Return values
HALstatus

Definition at line 330 of file stm32l4xx_hal_wwdg.c.

331 {
332  /* Write to WWDG CR the WWDG Counter value to refresh with */
333  WRITE_REG(hwwdg->Instance->CR, (hwwdg->Init.Counter));
334 
335  /* Return function status */
336  return HAL_OK;
337 }
WWDG_InitTypeDef Init
return HAL_OK