cancel
Showing results for 
Search instead for 
Did you mean: 

F303VCT6 (F3Disco) RC-SumSignal Read via PWM Input

jasson_face
Associate
Posted on April 26, 2015 at 15:43

Hello there,

i´m trying to read a rc receivers sumsignal via the PWM input feature. I just took the FW example and changed the ISR routine by placing the ''TIM_GetCapture1(TIM2);'' value into an array corresponding to a counter which is set to zero when a longer pulse than ''x'' is read.

It´s a 7 channel signal, but when i try to read moren than two, the sw ''doesn´t work''.

If i read a single channel signal it works perfect.

I guess i´m not the first one, trying this (allthough i couldn´t find someone else, only a solution for a read of four single single signals). So may be there is a detail in the configuration or in the principle the PWM input works, that i´m missing.

best regards!
3 REPLIES 3
Posted on April 26, 2015 at 16:28

Not sure I'd use PWM Input mode for a PPM signal. Remember PWM Input uses two channels to provide period and duty, and resets the counter. Perhaps better to time stamp the edges, and have the interrupt use a state machine, and identify the blank/slack time.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
jasson_face
Associate
Posted on April 27, 2015 at 08:03

Yea, finally i did it like that.

I hoped to get around that.

Posted on April 27, 2015 at 15:04

Unfortunately the timers aren't ideal for some, they are general purpose and useless for lots of things.

If you wanted to decimate IRQ loading, you could buffer samples with DMA. Initial synchronization, or resync, might be a bit tedious, but solvable.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..