STM8L15x Standard Peripherals Drivers: stm8l15x_wfe.c File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_wfe.c File Reference

This file provides firmware functions to manage the following functionalities of the Wait for Event (WFE) peripheral:

  • WFE Source configuration and management.
More...
#include "stm8l15x_wfe.h"

Go to the source code of this file.

Functions

void WFE_DeInit (void)
 Deinitializes the WFE registers to their default reset value.
FunctionalState WFE_GetWakeUpSourceEventStatus (WFE_Source_TypeDef WFE_Source)
 Gets the status of the specified source event.
void WFE_WakeUpSourceEventCmd (WFE_Source_TypeDef WFE_Source, FunctionalState NewState)
 Set the source that can generate the wake-up event.

Detailed Description

This file provides firmware functions to manage the following functionalities of the Wait for Event (WFE) peripheral:

  • WFE Source configuration and management.
Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
  *               
  *          ===================================================================
  *                               WFE specific features
  *          ===================================================================
  *
  *           Wait for event mode (WFE) stops the CPU but allows the other peripherals
  *           and interrupt controller to continue running.
  *           This mode is entered from Run mode by executing a WFE instruction.
  *           Peripheral events can be generated by the timers, serial interfaces, 
  *           DMA controller, comparators and I/O ports. 
  *           These are enabled by using the WFE_WakeUpSourceEventCmd() function.
  *           
  *           When a peripheral event is enabled, the corresponding interrupts are 
  *           not served and you have to clear the corresponding flag status.
  *           
  *           There are two ways to wake up the CPU from WFE mode:
  *            - Interrupts: When an interrupt occurs, the CPU wakes up from WFE mode
  *              serves the interrupt then goes back to WFE mode.
  *            - Wake up event: when a wake up event occurs, the CPU wakes up and 
  *              resumes processing, in this case and to save time and power consumption
  *              there is no context save/restore activity.            
  *                          
  *
  *  
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm8l15x_wfe.c.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com