/** @page DMA_ChannelsPriority Use DMA to transfer data with different channels priorities

  @par Firmware description

  This application  provides a short description of how to use the DMA peripheral,
  only the priority is changing. 
  Changing the channels priority has an impact on the result. All transfer size 
  is 8bit and length is 1.
  The channels are configured to perform these transfers:
  
  - DMA channel 0 : Transfer A : from RAM buffer2 to TIM3 register
  - DMA channel 1 : Transfer B : from RAM buffer1 to TIM2 register
  - DMA channel 2 : Transfer C : from TIM1 register to RAM buffer1
  - DMA channel 3 : Transfer D : from TIM4 register to RAM buffer2
  
  Before starting any transfer, the RAM buffers and timers registers are 
  initialized as follow:
  - RAM Buffer1 : 0x00
  - TIM1 ARRL : 0x11   
  - TIM2 ARRL : 0x22   
  - TIM3 ARRL : 0x33   
  - TIM4 ARR : 0x44 
  - RAM Buffer2 : 0x55
  
  After each specific configuration of the priorities, the RAM buffers and timers 
  registers  change.
  
  To select which configuration to run, uncomment one of the following "defines" 
  in main.c
  
  \#define PRIORITIES_CONFIG_HW
  \#define PRIORITIES_CONFIG_SW_1
  \#define PRIORITIES_CONFIG_SW_2
  
  Then read the value of RAM Buffer1, TIM1 ARRL, TIM2 ARRL, TIM3 ARRL, TIM4 ARR, RAM Buffer2.
  
  @b Note 1  : if  PRIORITIES_CONFIG_HW is defined, the expected result is :
   
  - RAM Buffer1 = 0x11
  - TIM1 ARRL = 0x11
  - TIM2 ARRL = 0x00
  - TIM3 ARRL = 0x55
  - TIM4 ARR = 0x44
  - RAM Buffer2 = 0x44
  
  @b Note 2  : if  PRIORITIES_CONFIG_SW_1 is defined, the expected result is : 
  
  - RAM Buffer1 = 0x11 
  - TIM1 ARRL = 0x11
  - TIM2 ARRL = 0x11
  - TIM3 ARRL = 0x44 
  - TIM4 ARR = 0x44
  - RAM Buffer2 = 0x44
  
  @b Note 3  : if  PRIORITIES_CONFIG_SW_2 is defined, the expected result is : 
  
  - RAM Buffer1 = 0x11 
  - TIM1 ARRL = 0x11
  - TIM2 ARRL = 0x00
  - TIM3 ARRL = 0x55 
  - TIM4 ARR = 0x44
  - RAM Buffer2 = 0x44
    
  @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.

  @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****/
