2013-03-21 12:25 AM
Device: STM32F405.
Is it possible to use two DMA streams with single request? For example, connect DMA2_Stream0 to channel 6 (TIM1_TRIG) and DMA2_Stream4 to channel 6 (TIM1_TRIG, too). I want to start two diffirent DMA transactions from single request. #stm32-dma2013-03-21 03:23 AM
9.3.2 mentions that DMA controller acknowledges the requests to the peripherals, so I doubt what you want would be possible.
OTOH, you could probably chain another timer and use that as the trigger source for the second DMA. JW2013-03-21 03:23 AM
Double post due to crappy forum software.
2013-03-29 11:34 AM
Answer to himself.
NO.I make the experiment.Run two DMA streams from SPI1_RX. First to transfer data from SPI1->DR to memory, second - transfer other data from memory to GPIO. After 5 requests fisrt NDTR decreased by 2, second - by 4.2013-03-29 12:59 PM
Thanks for letting us know ;)
JW2013-03-31 02:44 AM
Do you use only AHB or APB periferals with DMA2 , or you use AHB & APB on a concurrent way?
On the STM32F4 errata, it is documented that there may be data corruption in the second case. http://www.st.com/st-web-ui/static/active/en/resource/technical/document/errata_sheet/DM00037591.pdf 2.1.9 I think it is possible to use two DMA streams with single request. On the STM32F4 reference manual (DM0031020.pdf) , 9.3.3, look on the Figure 27. Channel selection ''Each stream is associated with a DMA request that can be selected out of 8 possible channel requests'' According to the documentation, Table 33 (DMA1 request mapping) and Table 34 (DMA2 request mapping) are examples of DMA request mappings. Try to assign the peripherals you want to use to different channel/stream than it is described in the examples tables.2013-03-31 04:45 AM
According to the documentation, Table 33 (DMA1 request mapping) and Table 34 (DMA2 request mapping) are examples of DMA request mappings.
Try to assign the peripherals you want to use to different channel/stream than it is described in the examples tables.
Yeah, I don't see that working, that's how they are actually wired. A better idea would be to use different TIMx_CHx combinations on the same timer, like TIM2_CH4, or just using duplicate CCRx values on multiple channels of a singular timer.2013-03-31 06:03 AM
Initially I also thought that that's how they are actually wired, but the key is the word ''examples''. An example is by definition ''an instance serving for illustration''.
If the reference manual is correct, you do not have to use the DMA request mapping of the example tables. You can map DMA channels & streams as you need for your project. Otherwise, we should suggest to ST to remove the word ''examples''.