Skip to main content
Explorer
January 6, 2024
Solved

Synchronous mode for DMAMUX - Trigger via EXTI

  • January 6, 2024
  • 2 replies
  • 3322 views

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 trigger the EXTI0 by EXTI pending register
  • DMAREQ_ID is TIMx_UP, which is continuously triggering dma requests
  • DMAMUX Generator isnt starting neither when I select EXTI as trigger input
  • SPOL is rising in DMAMUX
  • Using STM32G474RE

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.

 

    This topic has been closed for replies.
    Best answer by fullcustomasic

    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.

    2 replies

    Super User
    January 6, 2024

    > 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.

    Explorer
    January 6, 2024

    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?

     

    Super User
    January 6, 2024

    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?

    fullcustomasicAuthorAnswer
    Explorer
    January 7, 2024

    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.