Fixed small problem with DMA memory copy, the stream was not properly stopped.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3834 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
3fc915ec64
commit
09d8ca4bc0
|
@ -148,7 +148,7 @@
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name CR register constants only found in STM32F2xx/STM32F2xx
|
* @name CR register constants only found in STM32F2xx/STM32F4xx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define STM32_DMA_CR_DMEIE DMA_SxCR_DMEIE
|
#define STM32_DMA_CR_DMEIE DMA_SxCR_DMEIE
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name FCR register constants only found in STM32F2xx/STM32F2xx
|
* @name FCR register constants only found in STM32F2xx/STM32F4xx
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define STM32_DMA_FCR_FEIE DMA_SxFCR_FEIE
|
#define STM32_DMA_FCR_FEIE DMA_SxFCR_FEIE
|
||||||
|
@ -418,9 +418,11 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
|
||||||
*
|
*
|
||||||
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
||||||
*/
|
*/
|
||||||
#define dmaWaitCompletion(dmastp) \
|
#define dmaWaitCompletion(dmastp) { \
|
||||||
while (((dmastp)->stream->CNDTR > 0) && \
|
while ((dmastp)->stream->NDTR > 0) \
|
||||||
((dmastp)->stream->CCR & STM32_DMA_CR_EN))
|
; \
|
||||||
|
dmaStreamDisable(dmastp); \
|
||||||
|
}
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -418,9 +418,11 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
|
||||||
*
|
*
|
||||||
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
|
||||||
*/
|
*/
|
||||||
#define dmaWaitCompletion(dmastp) \
|
#define dmaWaitCompletion(dmastp) { \
|
||||||
while (((dmastp)->stream->CNDTR > 0) && \
|
while ((dmastp)->stream->NDTR > 0) \
|
||||||
((dmastp)->stream->CCR & STM32_DMA_CR_EN))
|
; \
|
||||||
|
dmaStreamDisable(dmastp); \
|
||||||
|
}
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
Loading…
Reference in New Issue