cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F334 use both TIM16 DMA channels

DRH
Associate III

Hi there,

I tried the hole day to use two DMA channels (TIM16) as depicted in the

reference manual. If I understand it right, there is the option to use channel

3 and channel 6. At channel 6 the update event can be disabled. That’s exactly

what I need, both channels in parallel, one at update and ch1 compare and the second only

at ch1 compare.

I configure timer 16 and both DMA channels but only channel 3 works. I notice, that the ISR flags of channel 3 are set as expected, the compare output works but there is no channel 6 DMA transfer.

I tried to generate a sample code using Cube, but there on only the option to use DMA channel 3 or 6.

Does anybody know if I’m on the wrong track and it’s not possible to use both channels in parallel?

Thank you for your support.

Regards,

3 REPLIES 3

You can't have both, as there's a switch steering, which one.

0693W000001cdbfQAA.png

JW

DRH
Associate III

Thank you very much. That was exactly my understanding and I tried that switch in the debugger as well. If I set it, channel 6 works but only triggered by the update, not CH1. Can you confirm that both DMA channels (3 and 6) will work together and in parallel, channel 3 at CH1 and UP and channel 6 only at CH1 (if mentioned flag is not set)?

It's strange and it looks like I have forgotten activating the CH1 DMA. But if I switch it off, the behavior of channel 3 will change so it looks like activation was successful. On the other hand, routing timer channel 1 to an output works fine.

> If I set it, channel 6 works but only triggered by the update, not CH1.

That's surprising and not what the RM appears to say. I'd expect, both will work out of CH6 if the switch is set.

> Can you confirm that both DMA channels (3 and 6) will work together and in parallel, channel 3 at CH1 and UP and channel 6 only at CH1 (if mentioned flag is not set)?

I don't have a 'F334 and would not try myself anyway, but I don't understand your point. Two DMA channels almost certainly won't work out of the same signal.

JW