/** @page DMA_WFE Use DMA to transfer during wfe low power mode. 

  @par Firmware description

  This application provides a short description of how to use the DMA peripheral in circular mode to transfer data from USART1 peripheral to RAM memory. 
When the user sends a character using USART1, this character will be transferred using DMA to a specific RAM buffer and a DMA event is provided by USART1_RX.
After configuring the DMA channel2 to transfer data (4 bytes) from USART1 data register to a RAM buffer, the MCU enters wfe mode.
While waiting the “DMA Transfer complete” event, the MCU is in wfe mode. 
As soon as the “DMA Transfer complete” event occurs, the MCU returns to run mode, executes a specific action (activate/deactivate Leds) depending to the Data in the RAM buffer and returns to the wfe mode (by software). 
Since the DMA channel 2 is configured in circular mode, the same procedure will be repeated infinitely.
Writing "led1" on HyperTerminal, will turn on LED1 and all the other leds will be turned off.
Writing "led2" on HyperTerminal, will turn on LED2 and all the other leds will be turned off.
Writing "led3" on HyperTerminal, will turn on LED3 and all the other leds will be turned off.
Writing "led4" on HyperTerminal, will turn on LED4 and all the other leds will be turned off.
Writing anything else than "led1", "led2", "led3" or "led4", will turn on all leds.
  
  @par Directory contents

  - include
    - stm8l15x_conf.h                Library Configuration file
    - stm8l15x_it.h                  Interrupt routines declaration
    - main.h                         Main program header file
 
  - source
    - stm8_interrupt_vector.c        Interrupt handlers
    - stm8l15x_it.c                  Interrupt routines source
    - main.c                         Main program  

  - project\\STVD\\Cosmic
    - project.stw                Contains the STVD workspace
    - project.stp                Contains the STVD project
    - stm8_interrupt_vector.c    Interrupt handlers
                 
  - project\\STVD\\Raisonance
    - project.stw                Contains the STVD workspace
    - project.stp                Contains the STVD project
         
  - RIDE
    - project.rapp               Contains the Ride workspace
    - project.rprj               Contains the Ride project


 @par Hardware and Software environment

  - This application runs on STM8l15x devices.
  
  - This application note has been tested with STMicroelectronics STM8L1526-EVAL evaluation
    board and ST Visual Develop (STVD) toolchain (Cosmic and Raisonance compilers).  

  - STM8L1526-EVAL Set-up
     - LCD glass daughter board (MB821)
  @note Make sure that the LCD glass daughter board (MB821) is mounted in IO position,
        for more details please refer to section "1.4 LCD glass Module" of the
        STM8L1526-EVAL User Manual.
     - LED1, LED2,LED3 and LED4.
     - Connect a null-modem female/female RS232 cable between the DB9 connector 
       CN1 and PC serial port.
  @note Make sure that JP5 jumper is in RS232 position
   ..
  - HyperTerminal configuration:
     - Word Length = 8 Bits
     - One Stop Bit
     - No parity
     - BaudRate = 9600 baud
     - flow control: None 
      

  @par How to use it with STVD ?
   
  - Open the STVD workspace
  - Rebuild all files: Project->Rebuild all
  - Load project image: Debug->Start/Stop Debug Session
  - Run program: Debug->Run (F5)

 @par How to use it with RIDE ?

  - Open the RIDE workspace
  - Rebuild all files: Project->Build project(Alt+F9)
  - Load project image: Debug->Start (Ctrl+D)
  - Run program: Debug->Run (Ctrl+F9)

*/

/******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
