This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EK-TM4C123GXL: Switch a configured gpio timer off

Part Number: EK-TM4C123GXL


After a timer is disabled. I want to switch the configured pin also off.

How i can do this?

Because when i start both timers again. I want to start in a preconfigured state.

void init_TIMER_0()
{
    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    while(!MAP_SysCtlPeripheralReady(SYSCTL_PERIPH_TIMER0));
    
    // Timer 0A is the data signal 1: PB6
    // Timer 0B is the udma trigger signal to GPIO: PB7
    
    MAP_GPIOPinConfigure(GPIO_PB6_T0CCP0);
    MAP_GPIOPinConfigure(GPIO_PB7_T0CCP1);
    
    MAP_GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_6);
    MAP_GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_7);
    
    MAP_TimerConfigure(TIMER0_BASE, TIMER_CFG_SPLIT_PAIR | 
                       TIMER_CFG_A_PWM | TIMER_CFG_B_PWM);
    
    MAP_TimerLoadSet(TIMER0_BASE, TIMER_BOTH, 
                     (SysCtlClockGet()/SIGNAL_FREQUENZ) - 1);
    
    // start led signal with the reset signal
    MAP_TimerMatchSet(TIMER0_BASE, TIMER_A, SIGNAL_RESET);
    
    // DMA Request
    MAP_TimerMatchSet(TIMER0_BASE, TIMER_B, SIGNAL_DMA);
}