Skip to main content
dhiry2k1
Associate II
January 30, 2015
Question

DMA Support in STMcube

  • January 30, 2015
  • 3 replies
  • 727 views
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
This topic has been closed for replies.

3 replies

dhiry2k1
dhiry2k1Author
Associate II
February 18, 2015
Posted on February 18, 2015 at 19:36

Anyone?

Tesla DeLorean
Guru
February 18, 2015
Posted on February 18, 2015 at 22:54

Anyone using Cube?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
childresss
Associate III
February 19, 2015
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!