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.

CC2652R: Integrating timer in Contiki TSCH based software with older SDK (version 4.40)

Part Number: CC2652R

Hi,

We have a TSCH communication software developed for CC2652R launchpad based on Contiki NGs modules. The timer processes of contiki are slow, so we are trying to add a continuous callback based timer function based on Timer.c and Timer.h of the TI SDK.

Our software uses the older SDK version 4.40. 

Even if I duplicate the example given in 'timerled' that blinks the LED for 1 second, there is actually a failure in the timer initialization itself. So, the MCU always hangs there when I add this part of the code. 

I did some digging and found that there are many differences in the functions of Timer.c of SDK 4.40 and the latest SDK (say version 7.10).

One example is the Timer_Init() function. In our 4.40 SDK it is like this:

/*
* ======== Timer_init ========
*/
void Timer_init(void)
{
uint_least8_t i;
uint_fast32_t key;

key = HwiP_disable();

if (!isInitialized) {
isInitialized = (bool) true;

/* Call each driver's init function */
for (i = 0; i < Timer_count; i++) {
Timer_config[i].fxnTablePtr->initFxn((Timer_Handle) &(Timer_config[i]));
}
}

HwiP_restore(key);
}

However, in the latest SDK, the function is actually blank as below:

/*
* ======== Timer_init ========
*/
void Timer_init(void)
{
/* Do nothing */
}

My question is: Was there any problem with previous implementations? Is it why I cannot get this simple example running?

Also, should I just replace the header and c files of Timer.c, Timer.h in my SDK? I wanted some assurance about if something was wrong so the SDK got updated else I might change two important files and still not get any result.

Looking forward to your help,

Abhijit

  • Hi Abhijit,

    The TI Drivers change/evolve over time with each update to the SDK for various reasons, such as fixing bugs and implementing new features.  You can review the CoreSDK Release Notes of each release to review what has changed, otherwise I recommend that you follow the implementation instructions from the TI Drivers Runtime APIs for the SDK version you are using.  Some TI Drivers also reference other modules/resources within the SDK which may have updated accordingly.  Thus although you could try replacing the specific Timer driver files (don't forget to include source\ti\drivers\timer files as well) this may cause build errors or unexpected runtime behavior, especially given the amount of updates which have occurred between the two SDKs under consideration (there was a SDK nomenclature change from CC13x2/CC26x2 to CC13xx/CC26xx during this time which could be problematic).  I've linked to v7.10 resources for instance but you should refer to the docs folder of the v4.40 SDK.

    Regards,
    Ryan

  • Thanks Ryan. I will look into the release notes of the SDK version that we are using and the immediate next ones to see if anything was reported about timer drivers.