cancel
Showing results for 
Search instead for 
Did you mean: 

How can I do to count motor steps with Input Capture Direct Mode with DMA?

SRivi.1
Associate II

I want to count the steps that the motor takes with DMA and when it reaches a certain number of steps, turn off the PWM timer. How do I read the incoming pulses?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

I would set up the timer in external clock mode and use the signal as the clock source.

I don't think DMA is needed here.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

I would set up the timer in external clock mode and use the signal as the clock source.

I don't think DMA is needed here.

If you feel a post has answered your question, please click "Accept as Solution".
SRivi.1
Associate II

Ok TDK, i will try this configuration. Thanks you!!!