STM32f1xx SPI DMA reset
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-07 12:05 PM
Posted on January 07, 2016 at 21:05
Hello,
I am having difficulty recovering from failed SPI transfers when using DMA. It appears that the DMA controller maintains the state of the failed transfer and tries to complete the operation when the next transaction is started. The only way I have found to fix this problem is to reset the processor! The new DMA configuration is ignored. I do not see a DMA channel reset in the user manual. Disable/Enable the SPI interface does not clear the problem.How do you recover from an interrupted SPI transfer when using DMA?TIA #dma #spi #stm32f1
Labels:
- Labels:
-
DMA
-
SPI
-
STM32F1 Series
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-08 6:24 AM
Posted on January 08, 2016 at 15:24
Before making any change to DMA registers you have to disable the DMA channel, not the SPI channel (but you should stop SPI too). After a fault disable the DMA channel and reprogram the DMA registers before enabling the channel again.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-01-08 8:24 AM
Posted on January 08, 2016 at 17:24
DMA_DeInit() doesn't work?
How about resetting the peripheral on the AHB? RCC_AHBPeriphResetCmd(RCC_AHBPeriph_DMA1, ENABLE); RCC_AHBPeriphResetCmd(RCC_AHBPeriph_DMA1, DISABLE);Or disassociating the DMA Rx/Tx on the SPI while you set things up
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
