AnsweredAssumed Answered

25 microSecond (not milli) Interrupt Advice

Question asked by new guy on Sep 18, 2015
Latest reply on May 5, 2017 by waclawek.jan
Hi,

I would be grateful for some advice on Sampling logic-level signal with a timer.
I haven't done embedded programming in a very long time and so have little experience with the current STM32 offering - and at the moment I am still waiting on Hardware to program. The FW will involve sampling at high frequency, and I see from the Forum that others have run into problems with their approach as regards over saturating the micro etc. I would be grateful if those with experience could tell me if the following approach seems reasonable. 

Basically I want to use a timer at 40kHz to sample the level of a pin and write it to an array element, incrementing along once every 25 uS, in an STM32F417 micro. Systick would remain at the usual 1mS. 
I would be using the cube TIM_timebase example for G-Eval board as a starting point and adjusting the timer and periods to achieve the above rate. Is that a bit naive or does it sound ok? Any ideas as to what kind of rate the above approach could be pushed to, i.e 0.5 MHz?

Thanks.



Outcomes