cancel
Showing results for 
Search instead for 
Did you mean: 

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

KHarb.1
Senior

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
KHarb.1
Senior

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.

View solution in original post

2 REPLIES 2
LCE
Principal

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

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.