cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing GPS Seconds Pulse STM32F1xx

eliast1234
Associate II
Posted on April 20, 2015 at 10:33

Hi,

i have an external GPS signal that delivers seconds pulses (a short pulse every second).

My goal is to count seconds in SW and trigger some actions every X seconds.

Question a) I intend to use EXTI interrupt on every rising edge and count to a certain total in SW. But, what do you think would be the proper method of doing this? A timer input capturing better than EXTI, you think?

b) What should be the timer config for TMR_PSC and TMR_PERIOD for the best precise detection, if you think Timer IC is better (timer freq is 24Mhz)? 

#timer #exti #gps
2 REPLIES 2
Posted on April 20, 2015 at 14:31

For a 1 Hz signal the EXTI would be fine.

You could use a TIM to *count* the pulses, and use a compare register to trigger after N more pulses (advance CCRx).

The 24 MHz would only be important if you were looking to measure the period, or pulse width, but that's not the question you asked.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
eliast1234
Associate II
Posted on April 20, 2015 at 18:41

Thank you Mr. clive1!