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.

CC1314R10: In CC1314R10: Issues on updating the timestamp after the Freertos scheduler.

Part Number: CC1314R10


Tool/software:

Hi team,


   We are trying to bring up Internal RTC in the sensor example for CC1314R10. While updating the timestamp before starting the FreeRTOS scheduler, it updates and works fine. In this we are facing an issue whenever updating the timestamp after the scheduler starts; RF tasks never came from semwait(). And even locks if we add a delay next to the updating timestamp never came out from the delay.

This is what we are used to for updating the timestamp.

u32_timestamp = current epoch timestamp.

subsec_value = ((u32_timestamp % 1) * RTC_TICKS_PER_SECOND);

AONRTCDisable();

AONRTCChannelDisable(AON_RTC_CH0);

HWREG(AON_RTC_BASE + AON_RTC_O_SEC) = u32_timestamp;

HWREG(AON_RTC_BASE + AON_RTC_O_SUBSEC) = subsec_value; // Sub-seconds

AONRTCChannelEnable(AON_RTC_CH0);

AONRTCCombinedEventConfig(AON_RTC_CH0);

AONRTCEnable();

Kindly support us to update the timestamp whenever the current time is received from the collector.

Regards,

Manivel.

  • Hi team,

    For clarification we had added some points.

    1. Whenever we are receiving the timestamp value from the collector. We set the event and get the semaphore, and this will update the received timestamp in the "apptaskfn" task.

    2. Now we have created a new task, get the semaphore in this task and set the event to update the timestamp it works fine. How does it work here?.

    Regards,
    Manivel

  • Please provide info regarding what SDK you are using and, what exact example, and which IDE you are using?

    Siri

  • Hi siri,

        I had imported sensor example from resource explorer which is from FREERTOS and used TI CLANG COMPILER.

        Sdk version - simplelink_cc13xx_cc26xx_sdk_7_41_00_17.


        Part Number: CC1314R10.
    .

        IDE - Code Composer Studio and it Version: 12.8.0.00012.

    Regards,

    Manivel


       

       

  • Hi Manivel,

    I would suggest you to use the timer module included with FreeRTOS. I think there's a risk you're using the same timer channel as FreeRTOS is trying to use and thus cause a crash.

    Cheers,

    Marie H

  • Hi Marie H,

    Thanks for your reply.

    In sensor example, it uses clockP timer module. In this we can able to set timeout from the current system ticks. But i need to update the real time timestamp whenever the epoch timestamp received from the collector. Then how can i update the real time timetamp to the current ticks. 

    Please support me to update the real time timestamp to the internal RTC.

    Regards,

    Manivel.

  • Hi Manivel,

    I would advice you to use FreeRTOS APIs to make sure you're not interfering with it's timer and causing a crash.

    Googling how to get the current time in FreeRTOS has a lot of hits, e.g.:

    https://forums.freertos.org/t/getting-current-time/14198/6

    Cheers,

    Marie H