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.

CC1310: CC1310 Real TIme clock for NoRtos Configuration

Part Number: CC1310

Hello.

I've been reading about RTC in the reference manual for CC1310 and came across an example for the same. Also came across the AON module in the driverlib folder. But that example was for Ti Rtos configuration. I'm not able to find similar example using any Ti drivers for NoRtos configuration. Is there any way implement RTC with Ti drivers and NoRtos configuration? 

Regards,

Nishit.

  • Hi Nishit,

    The NoRTOS DPL already implement the RTC as part of the TimerP module (much like TI-RTOS does). This module the further feeds the ClockP module so you could consider a ClockP object an RTC clock object.

    As most TI Drivers depends on the ClockP module in some way, you would have to be careful when setting up additional RTC interrupts/events as this could interfere with the TImerP module.

    I would suggest you have a look inside TimerPCC26XX_nortos.c and see how NoRTOS uses the AONRTC DriverLib. From this point, you could possibly extend it to feature more channels and events if you need to.
  • Hello M-W.

    I've done the following thing so far. 

    uint32_t Clock_tickPeriod = 10;
    ClockP_Struct   clk0Struct, clk1Struct;    
    ClockP_Handle clk2Handle;
    void clk0Fxn(uintptr_t arg0); 
    int main(void)
    {
    /* Call driver init functions */
        Board_initGeneral();
        /* Start NoRTOS */
          NoRTOS_start();
    
          fnUartInit();
    
          ClockP_Params clkParams; 
         ClockP_Params_init(&clkParams);
         
        clkParams.period = 1000000/Clock_tickPeriod;
        clkParams.startFlag = true;
        /* Construct a periodic Clock Instance */
         ClockP_construct(&clk0Struct, (ClockP_Fxn)clk0Fxn,
                   1000000/Clock_tickPeriod, &clkParams);
    
         clk2Handle = ClockP_handle(&clk0Struct);
           ClockP_start(clk2Handle);
    }
    /*************** ISR ********************/		
    void clk0Fxn(uintptr_t arg0)
    {
     uint32_t time;
        time = ClockP_getTicks();
       }	
    

    This is giving me interrupt every one sec. So is this the correct way to utilize RTC ?

    Regards,

    Nishit.

  • Hi Nishit,

    Yes, this would mean you utilize the RTC and can go into standby while waiting for the next clock tick.
    If all you need is a periodic timer, this would be the recommended approach. There is some jitter related to this compared to the raw RTC interrupt as it propagates via a few SW layers that could be worth measuring if the application is very time sensitive.