CARME-M4 BSP
V1.5
|
DMA driver modules. More...
Modules | |
DMA_Exported_Constants | |
DMA_Private_Functions | |
Data Structures | |
struct | DMA_InitTypeDef |
DMA Init structure definition. More... | |
Functions | |
void | DMA_DeInit (DMA_Stream_TypeDef *DMAy_Streamx) |
Deinitialize the DMAy Streamx registers to their default reset values. More... | |
void | DMA_Init (DMA_Stream_TypeDef *DMAy_Streamx, DMA_InitTypeDef *DMA_InitStruct) |
Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure. More... | |
void | DMA_StructInit (DMA_InitTypeDef *DMA_InitStruct) |
Fills each DMA_InitStruct member with its default value. More... | |
void | DMA_Cmd (DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState) |
Enables or disables the specified DMAy Streamx. More... | |
void | DMA_PeriphIncOffsetSizeConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_Pincos) |
Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses). More... | |
void | DMA_FlowControllerConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FlowCtrl) |
Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory). More... | |
void | DMA_SetCurrDataCounter (DMA_Stream_TypeDef *DMAy_Streamx, uint16_t Counter) |
Writes the number of data units to be transferred on the DMAy Streamx. More... | |
uint16_t | DMA_GetCurrDataCounter (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the number of remaining data units in the current DMAy Streamx transfer. More... | |
void | DMA_DoubleBufferModeConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t Memory1BaseAddr, uint32_t DMA_CurrentMemory) |
Configures, when the DMAy Streamx is disabled, the double buffer mode and the current memory target. More... | |
void | DMA_DoubleBufferModeCmd (DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState) |
Enables or disables the double buffer mode for the selected DMA stream. More... | |
void | DMA_MemoryTargetConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t MemoryBaseAddr, uint32_t DMA_MemoryTarget) |
Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use). This function can be called when the DMA Stream is enabled and when the transfer is ongoing. More... | |
uint32_t | DMA_GetCurrentMemoryTarget (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the current memory target used by double buffer transfer. More... | |
FunctionalState | DMA_GetCmdStatus (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the status of EN bit for the specified DMAy Streamx. More... | |
uint32_t | DMA_GetFIFOStatus (DMA_Stream_TypeDef *DMAy_Streamx) |
Returns the current DMAy Streamx FIFO filled level. More... | |
FlagStatus | DMA_GetFlagStatus (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FLAG) |
Checks whether the specified DMAy Streamx flag is set or not. More... | |
void | DMA_ClearFlag (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_FLAG) |
Clears the DMAy Streamx's pending flags. More... | |
void | DMA_ITConfig (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT, FunctionalState NewState) |
Enables or disables the specified DMAy Streamx interrupts. More... | |
ITStatus | DMA_GetITStatus (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT) |
Checks whether the specified DMAy Streamx interrupt has occurred or not. More... | |
void | DMA_ClearITPendingBit (DMA_Stream_TypeDef *DMAy_Streamx, uint32_t DMA_IT) |
Clears the DMAy Streamx's interrupt pending bits. More... | |
DMA driver modules.
#define DMA_Stream0_IT_MASK |
Definition at line 143 of file stm32f4xx_dma.c.
#define TRANSFER_IT_ENABLE_MASK |
Definition at line 140 of file stm32f4xx_dma.c.
void DMA_ClearFlag | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FLAG | ||
) |
Clears the DMAy Streamx's pending flags.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FLAG | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
Definition at line 1071 of file stm32f4xx_dma.c.
void DMA_ClearITPendingBit | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT | ||
) |
Clears the DMAy Streamx's interrupt pending bits.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT | specifies the DMA interrupt pending bit to clear. This parameter can be any combination of the following values:
|
None |
Definition at line 1252 of file stm32f4xx_dma.c.
void DMA_Cmd | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
FunctionalState | NewState | ||
) |
Enables or disables the specified DMAy Streamx.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
NewState | new state of the DMAy Streamx. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 478 of file stm32f4xx_dma.c.
void DMA_DeInit | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Deinitialize the DMAy Streamx registers to their default reset values.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
None |
Definition at line 196 of file stm32f4xx_dma.c.
void DMA_DoubleBufferModeCmd | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
FunctionalState | NewState | ||
) |
Enables or disables the double buffer mode for the selected DMA stream.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
NewState | new state of the DMAy Streamx double buffer mode. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 761 of file stm32f4xx_dma.c.
void DMA_DoubleBufferModeConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | Memory1BaseAddr, | ||
uint32_t | DMA_CurrentMemory | ||
) |
Configures, when the DMAy Streamx is disabled, the double buffer mode and the current memory target.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Memory1BaseAddr | the base address of the second buffer (Memory 1) |
DMA_CurrentMemory | specifies which memory will be first buffer for the transactions when the Stream will be enabled. This parameter can be one of the following values:
|
None |
Definition at line 730 of file stm32f4xx_dma.c.
void DMA_FlowControllerConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FlowCtrl | ||
) |
Configures, when the DMAy Streamx is disabled, the flow controller for the next transactions (Peripheral or Memory).
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FlowCtrl | specifies the DMA flow controller. This parameter can be one of the following values:
|
None |
Definition at line 550 of file stm32f4xx_dma.c.
FunctionalState DMA_GetCmdStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the status of EN bit for the specified DMAy Streamx.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Current | state of the DMAy Streamx (ENABLE or DISABLE). |
Definition at line 943 of file stm32f4xx_dma.c.
uint16_t DMA_GetCurrDataCounter | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the number of remaining data units in the current DMAy Streamx transfer.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | number of remaining data units in the current DMAy Streamx transfer. |
Definition at line 647 of file stm32f4xx_dma.c.
uint32_t DMA_GetCurrentMemoryTarget | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the current memory target used by double buffer transfer.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | memory target number: 0 for Memory0 or 1 for Memory1. |
Definition at line 828 of file stm32f4xx_dma.c.
uint32_t DMA_GetFIFOStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx | ) |
Returns the current DMAy Streamx FIFO filled level.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
The | FIFO filling state.
|
Definition at line 977 of file stm32f4xx_dma.c.
FlagStatus DMA_GetFlagStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_FLAG | ||
) |
Checks whether the specified DMAy Streamx flag is set or not.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_FLAG | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of DMA_FLAG (SET or RESET). |
Definition at line 1004 of file stm32f4xx_dma.c.
ITStatus DMA_GetITStatus | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT | ||
) |
Checks whether the specified DMAy Streamx interrupt has occurred or not.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT | specifies the DMA interrupt source to check. This parameter can be one of the following values:
|
The | new state of DMA_IT (SET or RESET). |
Definition at line 1170 of file stm32f4xx_dma.c.
void DMA_Init | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
DMA_InitTypeDef * | DMA_InitStruct | ||
) |
Initializes the DMAy Streamx according to the specified parameters in the DMA_InitStruct structure.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_InitStruct | pointer to a DMA_InitTypeDef structure that contains the configuration information for the specified DMA Stream. |
None |
Definition at line 319 of file stm32f4xx_dma.c.
void DMA_ITConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_IT, | ||
FunctionalState | NewState | ||
) |
Enables or disables the specified DMAy Streamx interrupts.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_IT | specifies the DMA interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
|
NewState | new state of the specified DMA interrupts. This parameter can be: ENABLE or DISABLE. |
None |
Definition at line 1118 of file stm32f4xx_dma.c.
void DMA_MemoryTargetConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | MemoryBaseAddr, | ||
uint32_t | DMA_MemoryTarget | ||
) |
Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use). This function can be called when the DMA Stream is enabled and when the transfer is ongoing.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
MemoryBaseAddr | The base address of the target memory buffer |
DMA_MemoryTarget | Next memory target to be used. This parameter can be one of the following values:
|
None |
Definition at line 802 of file stm32f4xx_dma.c.
void DMA_PeriphIncOffsetSizeConfig | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint32_t | DMA_Pincos | ||
) |
Configures, when the PINC (Peripheral Increment address mode) bit is set, if the peripheral address should be incremented with the data size (configured with PSIZE bits) or by a fixed offset equal to 4 (32-bit aligned addresses).
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
DMA_Pincos | specifies the Peripheral increment offset size. This parameter can be one of the following values:
|
None |
Definition at line 514 of file stm32f4xx_dma.c.
void DMA_SetCurrDataCounter | ( | DMA_Stream_TypeDef * | DMAy_Streamx, |
uint16_t | Counter | ||
) |
Writes the number of data units to be transferred on the DMAy Streamx.
DMAy_Streamx | where y can be 1 or 2 to select the DMA and x can be 0 to 7 to select the DMA Stream. |
Counter | Number of data units to be transferred (from 0 to 65535) Number of data items depends only on the Peripheral data format. |
The | number of remaining data units in the current DMAy Streamx transfer. |
Definition at line 632 of file stm32f4xx_dma.c.
void DMA_StructInit | ( | DMA_InitTypeDef * | DMA_InitStruct | ) |
Fills each DMA_InitStruct member with its default value.
DMA_InitStruct | : pointer to a DMA_InitTypeDef structure which will be initialized. |
None |
Definition at line 403 of file stm32f4xx_dma.c.