Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
Data Counter functions
[DMA_Private_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. | |
uint16_t | DMA_GetCurrDataCounter (DMA_Channel_TypeDef *DMAy_Channelx) |
Returns the number of remaining data units in the current DMAy Channelx transfer. |
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:
-
The number of remaining data units in the current DMAy Channelx transfer.
Definition at line 405 of file stm32f30x_dma.c.
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.
Definition at line 387 of file stm32f30x_dma.c.
Generated on Tue Jul 12 2022 17:34:45 by
