Part Number: MSP432P4111
I'm trying to use a timer as a pulse counter on the MSP432 using an external source on a GPIO pin (P7.4/PM_TA1.4/C0.5), but when I apply a square wave to the GPIO input the timer counter doesn't change. Am I missing something? The code is shown below:
GPIO_setAsInputPin(GPIO_PORT_P7, GPIO_PIN4);
Timer_A_params.clockSource = TIMER_A_CLOCKSOURCE_EXTERNAL_TXCLK;
Timer_A_params.clockSourceDivider = TIMER_A_CLOCKSOURCE_DIVIDER_1;
Timer_A_params.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_DISABLE;
Timer_A_params.timerClear = TIMER_A_DO_CLEAR;
Timer_A_initContinuousMode(TIMER_A1_BASE, &Timer_A_params);
Timer_A_startCounter(TIMER_A1_BASE, TIMER_A_CONTINUOUS_MODE);
Unfortunately there are no examples that I've come across that use an external pin as a timer source, and the documentation I've found doesn't do a good job explaining how to set it up.
Thanks