STM32F37 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Data Counter functions

Data Counter functions. More...

Functions

void DMA_SetCurrDataCounter (DMA_Channel_TypeDef *DMAy_Channelx, uint16_t DataNumber)
 Sets the number of data units in the current DMAy Channelx transfer. More...
 
uint16_t DMA_GetCurrDataCounter (DMA_Channel_TypeDef *DMAy_Channelx)
 Returns the number of remaining data units in the current DMAy Channelx transfer. More...
 

Detailed Description

Data Counter functions.

 ===============================================================================
                      ##### Data Counter functions #####
 ===============================================================================
    [..] This subsection provides function allowing to configure and read the buffer 
         size (number of data to be transferred).The DMA data counter can be written 
         only when the DMA channel is disabled (ie. after transfer complete event).
    [..] The following function can be used to write the Channel data counter value:
         (+) void DMA_SetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx, uint16_t 
             DataNumber).
    -@- It is advised to use this function rather than DMA_Init() in situations 
        where only the Data buffer needs to be reloaded.
    [..] The DMA data counter can be read to indicate the number of remaining transfers 
         for the relative DMA channel. This counter is decremented at the end of each 
         data transfer and when the transfer is complete: 
         (+) If Normal mode is selected: the counter is set to 0.
         (+) If Circular mode is selected: the counter is reloaded with the initial 
         value(configured before enabling the DMA channel).
    [..] The following function can be used to read the Channel data counter value:
         (+) uint16_t DMA_GetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx).

Function Documentation

uint16_t DMA_GetCurrDataCounter ( DMA_Channel_TypeDef *  DMAy_Channelx)

Returns the number of remaining data units in the current DMAy Channelx transfer.

Parameters
DMAy_Channelx,:where y can be 1 or 2 to select the DMA and x can be 1 to 7 for DMA1 and 1 to 5 for DMA2 to select the DMA Channel.
Return values
Thenumber of remaining data units in the current DMAy Channelx transfer.
void DMA_SetCurrDataCounter ( DMA_Channel_TypeDef *  DMAy_Channelx,
uint16_t  DataNumber 
)

Sets the number of data units in the current DMAy Channelx transfer.

Parameters
DMAy_Channelx,:where y can be 1 or 2 to select the DMA and x can be 1 to 7 for DMA1 and 1 to 5 for DMA2 to select the DMA Channel.
DataNumber,:The number of data units in the current DMAy Channelx transfer.
Note
This function can only be used when the DMAy_Channelx is disabled.
Return values
None