2024-01-06 08:40 AM
Hello community!
I set up a dmamux channel, which is working perfectly in unconditional mode(direct mux). Now I want to use synchronous mode, where the EXTI0 line Interrupt is the trigger(or latch), so it initiates the DMA request transactions. I get the exti0 interrupts, selected the right sync_id (0) and polarity in dmamux registers but there seems to be no requests firing. I verify that, by setting the TC(transaction complete bit) in the DMA channel and by sending more requests than defined in CNDTR.
Some more notes:
I also tried it with exti1, but its not working with that neither.
Am I missing something? I cant imagine that only 'real hardware interrupts' triggered by peripherals can be sync. triggers.
Solved! Go to Solution.
2024-01-07 10:53 AM - edited 2024-01-27 03:10 AM
Ok..so apparently only 'real hardware interrupts' can be used for DMAMUX. I configured the user button and routed exti13 via this button as interrupt, now the DMAMUX is doing what it should. But its pretty sad that you cant trigger that via software.
Maybe also good to know is, that it is not enough if DMAREQ_ID is the same in more than two channels, and one event is triggering another adjacent channel. Sadly that is not working, you need two seperate trigger sources if the channels are adjacent or chained.
2024-01-06 09:06 AM
> DMAREQ_ID is TIMx_UP, which is continuously triggering dma requests
This is the issue. If you want EXTI to trigger it, it should come from the EXTI.
The documentation for this is lacking, at least in the reference manual.
I suspect you assign the channel with dma request 1 (DMAMUX_Req G0) and then set this up to be triggered by EXTI0 in the DMAMUX_RGxCR register by setting SIG_ID=0 (EXTI LINE0). The naming scheme for this in the RM is inconsistent.
2024-01-06 09:16 AM - edited 2024-01-06 09:18 AM
I understood it like that: You can have a trigger(DMAREQ_ID) and a latch(SYNC_ID). No matter what is happening with the trigger, as long as no 'latch' is detected, no dmarequest is redirected. Only when a latch signal occurs, (NBREQ + 1) requests are redirected(but only after the latch, or SYNC_ID). Thats what I read from Picture of the G4 RM0440, page 431 in-document.
So I assign the channel with 79(TIM15_UP) request and SYNC_ID = 0 (EXTI0) as sync start, and enable sync bit.
Is this wrong? If yes, how can I implement the solution so, that I can ignore requests as long as some signal(i guess a sync signal) is high?
2024-01-06 09:38 AM
I don't understand why TIM15 is involved at all--can you clarify what behavior you're looking for? It sounds like you want a single DMA trigger for every EXTI0 edge, or is it something else?
2024-01-06 09:46 AM
Yes its something else. I want basically to start a DMAMUX-chain. EXTI0 is the initial trigger to start the transaction-chain:
2024-01-07 10:53 AM - edited 2024-01-27 03:10 AM
Ok..so apparently only 'real hardware interrupts' can be used for DMAMUX. I configured the user button and routed exti13 via this button as interrupt, now the DMAMUX is doing what it should. But its pretty sad that you cant trigger that via software.
Maybe also good to know is, that it is not enough if DMAREQ_ID is the same in more than two channels, and one event is triggering another adjacent channel. Sadly that is not working, you need two seperate trigger sources if the channels are adjacent or chained.