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.

RTOS/LAUNCHXL-CC2640R2: help with the function "GPTimerCC26XX_close(hTimer)" in the GPTimer library

Part Number: LAUNCHXL-CC2640R2

Tool/software: TI-RTOS

Hello,

The example provided by Siri in this thread is really helpful, but for me some questions remain:

1. Does this program only run once when starting, because there is no loop or anything?

2. In order to run this program in a loop, do I have to put Timer_start() in a loop like this?

    while(1)
    {
        GPTimerCC26XX_start(hTimer0A);
        GPTimerCC26XX_start(hTimer0B);

        if (timeDiff != 0){
            GPIO_write(Board_GPIO_LED1, Board_GPIO_LED_ON); // Grün
            break;
        }
    }

3. Do these code lines serve the purpose to assign the Interrupt to the Pins 1 / 21 ?

.

.

    /* Open LED pins */
    ledPinHandle = PIN_open(&ledPinState, pinTable);
    if (ledPinHandle == NULL)
    {
        while(1);
    }
.
.
GPTimerCC26XX_PinMux pinMux = GPTimerCC26XX_getPinMux(hTimer0A);
    PINCC26XX_setMux(ledPinHandle, CC1310_LAUNCHXL_DIO21, pinMux);
    
    pinMux = GPTimerCC26XX_getPinMux(hTimer0B);
    PINCC26XX_setMux(ledPinHandle, CC1310_LAUNCHXL_DIO1, pinMux);

But what is the reason for the LED's here?

If there is any further documentation please let me know!

Kind regards