2015-01-30 06:53 AM
I am just integrating new STMcube for my project on STM32F4. I want to use DMA on USART1 without any interrupt. But i had a look at STMCube library, It uses Interrupts in DMA.
Any thoughts how can i make DMA work without Interrupts in STMCube. #stm32cube #i-can''t-help-you-with-that #dma-stmcube #fixed-that-for-you2015-02-18 10:36 AM
2015-02-18 01:54 PM
Anyone using Cube?
2015-02-18 10:41 PM
the concept of DMA is that you define a DMA complete callback to override the library's __weak default callback. Then you start a DMA operation and go do something. The HAL ISR for that DMA complete interrupt will call your callback function so you can know that the DMA data has been transferred. That callback is in ISR CONTEXT so it needs to set a flag or some such and immediately return.
Your main code can be a finite state machine (FSM) or an RTOS that expects the flag change by the callback. Or the callback can change the state variable in the FSM. Etc. Just ordinary systems work. I'm using CubeMX flowing into IAR, and with interrupts and DMA. Non-interrupt polling of DMA complete is counter to the reason for using DMA!