I have an interesting issue with the timer on a TM4C that I have been trying to resolve.
TIMER_CFG_A_ACT_TOGGLE works exactly as expected, but TIMER_CFG_A_ACT_SETCLRTO does nothing. The output stays low. After trying TIMER_CFG_A_ACT_SETTOGTO andTIMER_CFG_A_ACT_CLRTOGTO, it appears that the action on timeout is working correctly, but the immediate set and clear do not work.
#include <stdint.h> #include <stdbool.h> #include "driverlib/gpio.h" #include "driverlib/pin_map.h" #include "driverlib/sysctl.h" #include "driverlib/timer.h" #include "inc/hw_memmap.h" int main(void) { SysCtlClockFreqSet(SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480, 120000000); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM); SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER5); while (!SysCtlPeripheralReady(SYSCTL_PERIPH_TIMER5)); while (!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOM)); GPIOPinTypeTimer(GPIO_PORTM_BASE, GPIO_PIN_6); GPIOPinConfigure(GPIO_PM6_T5CCP0); while(1) { TimerConfigure(TIMER5_BASE, TIMER_CFG_SPLIT_PAIR | TIMER_CFG_A_ONE_SHOT | TIMER_CFG_A_ACT_SETTO); TimerLoadSet(TIMER5_BASE, TIMER_A, 2400); TimerEnable(TIMER5_BASE, TIMER_A); SysCtlDelay(400000); } return 0; }