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/CC2640R2F: Unresolved symbols when trying to create periodic interrupts

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hi,

I just started developing on the CC2640R2 and I am trying to generate periodic interrupts. Since there is no example, I started with the empty project. There is some sample code in the Timer.h file that I added to the empty project:

Timer_init();

Timer_Handle handle;
Timer_Params params;
int32_t status;

Timer_CallBackFxn callBack = manageInterrupts;

Timer_Params_init(&params);
params.periodUnits = Timer_PERIOD_HZ;
params.period = 1000;
params.timerMode = Timer_CONTINUOUS_CALLBACK;
params.timerCallback = callBack;

//handle = Timer_open(Board_GPTIMER0A, &params);

if (handle == NULL) {
// Timer_open() failed
while (1);
}

status = Timer_start(handle);

when I try to compile, I get this error: 

unresolved symbol Timer_config, first referenced in C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/drivers/lib/drivers_cc26x0r2.aem3<Timer.oem3>

I don't understand what the problem is and I cannot find any sample code for periodic timers online either. Any help would be much appreciated.

Kind regards,

Lukas

  • Hi Lukas,

    Please refer to the code in GPTimerCC26XX.h as a sample.
  • Hi Sean,

    Could you please explain why I can't use the functions in Timer.h? I thought the functions in GPTimerCC26XX.h were platform specific and that the functions in Timer.h use these specific functions to provide generic implementations that are platform independent. Is this wrong? If so, then what are the functions in Timer.h for?

    Lukas

  • Hi Lukas,

    Because doing a regex search in the latest CC2640R2 SDK 1.40, I do not see a definition for Timer_config structure, usually this is done in the board file.

    Looking further into this, it appears that there is no Timer_FxnTable is specified within GPTimerCC26XX.c.

    The general paradigm for cross-platform TI-Drivers is that Timer.c, Timer.h specific a platform independent interface to the driver.These are the APIs used by the high level application, which makes porting easier between devices such as MSP432 and CC26xx. Then the platform specific implementation of the timer module is done within a device specific file such as GPTimerCC26xx or TimerMSP432.
    The generic interface is mapped to a table of function pointers in the device specific implementation using the Timer_FxnTable mentioned above

    However, it appears that unfortunately the GPTimerCC26XX implementation doesn't support the genic interface, so it would be best to use the GPTimerCC26xx layer directly.