STM32F303 ADC/DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 10:25 AM
I am using all 4 ADC's with 4 channels used on each. ADC 1 is on DMA1 and ADCs 2-4 have channels on DMA2. All 4 ADC's run off timer15 at 1Khz. The problem I am having is that I only get DMA interrupts for ADC 3,4 a few times and then not at all. If I change the DMA priority so that it is higher on ADC4, then I only get ADC1 and ADC4. DMA2 doesn't seem to be arbitrating among the channels. It doesnt effect it if the IRQ priority on each of the DMA interrupts is the same or different.
Suggestions? #stm32-adc-dma- Labels:
-
ADC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 1:32 PM
Suggestions?
Is the DMA indicating any error/fault condition? The IRQ typically doesn't fire unless the DMA is actually functioning[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/STM32F3%20Discovery%20next%20steps&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=2755]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FSTM32F3%20Discovery%20next%20steps&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=2755Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 2:05 PM
ST needs to step into this discussion to clarify. According to the reference manual, Rev 3 Section 11.4.7, DMA2 is not designed to arbitrate among channels.
DMA2 controller
The five requests from the peripherals (TIMx (x= 6,7,8), ADCx (x=2,3,4), SPI/I2S3, UART4, DAC_Channel[1,2] ) are simply logically ORed before entering the DMA2, this means that only one request must be enabled at a time. Refer to Figure 25: STM32F303xB/C and STM32F358xC DMA2 request mapping. The reference manual says DMA 1 can arbitrate between channels. The referenced figures show a similar arrangement of OR'd peripherals for each channel for both DMAs. Confusing, no ? Cheers, Hal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 2:12 PM
If you are not chained to the F303, the F4 has streams to take care of this sort of problem.
Cheers, Hal- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-26 4:18 PM
Will push to moderation.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-27 4:31 AM
Not sure about the comments on the DMA engine or'ing the channel sources together, but if I run ADC's 1 & 2 off of timer 15, then use separate timers for ADCs 3 &4 (3 timers total), then I get all the DMA interrupts.
