2015-04-20 01:33 AM
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 #gps2015-04-20 05:31 AM
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.2015-04-20 09:41 AM
Thank you Mr. clive1!