Skip to main content
Visitor II
June 21, 2023
Solved

Can DMA be used to forward input capture values to periferal registers?

  • June 21, 2023
  • 2 replies
  • 1077 views

I need to use DMA to forward input capture values from the timers to the DAC output register. The input capture values represent the period of the input signal, which makes it work as an FM demodulator. If I can route the captured values to DACs and other peripherals, I can process more channels and use higher carrier frequencies. 

I’ve tried to do this before, but couldn’t make it work.  This process may end up gating the application so I'm trying again.  I've received bits of advice, but nothing worked.  I still don't know if is even possible. I'd basically need working code to confirm since I can't figure it out. 

Also, I attempted this process on an STM32L4...and I'm not sure if behavior might differ from unit to unit.  I'm considering switching to a unit with more timers, so I'm not sure if DMA behavior will be substantively different.

 

 

    This topic has been closed for replies.
    Best answer by KHarb.1

    When using Cube IDE, post-configuration steps are required for this. Change CPAR and CMAR registers in the DMA channel used, and this works with ease.

    2 replies

    Graduate II
    June 21, 2023

    Sorry, not helpful, but because you basically want to give single input capture values directly from timer to DAC - and probably at "high speed" - this sounds like a job for an FPGA.

    Unless there's maybe a specialized MCU made for this purpose.

    KHarb.1AuthorAnswer
    Visitor II
    June 21, 2024

    When using Cube IDE, post-configuration steps are required for this. Change CPAR and CMAR registers in the DMA channel used, and this works with ease.