cancel
Showing results for 
Search instead for 
Did you mean: 

DMA Support in STMcube

dhiry2k1
Associate II
Posted on January 30, 2015 at 15:53

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-you
3 REPLIES 3
dhiry2k1
Associate II
Posted on February 18, 2015 at 19:36

Anyone?

Posted on February 18, 2015 at 22:54

Anyone using Cube?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
childresss
Associate II
Posted on February 19, 2015 at 07:41

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!