Hardware Frequency Divider: MSPM0 Timer Compare Mode for 1s Precision Interrupt
00:06:11
|
04 AUG 2025
This demo configures TimerG in compare mode to build a hardware frequency divider. PA12 detects edges of PB0's 50%-duty square wave which frequency adjustable via UART. TIMG auto-counts edges and triggers interrupt when counts match the target value, such as input_freq for 1s period. Jumper links PB0 to PA12, while REPEAT COUNTER suppresses intermediate interrupts, achieving zero-CPU-load pulse processing.