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/EK-TM4C1294XL: Real Time Clock example for Ti-RTOS

Part Number: EK-TM4C1294XL

Tool/software: TI-RTOS

 Hello,

I have used examples from Ti-RTOS for TIVA C to implement ADC and FATFS successfully on TIVA c Launchpad. I am writing data from 12 ADC inputs to the SD card and want to implement RTC for the time-stamp. I am also looking for an example to use a timer to set the data log time from 1sec to 1min.

I have tried to use available TivaWare Example (Interrupt and Timer) with my existing workspace of TI-RTOS which outputs compile errors relating "Unresolved symbol ROM_...." 

I suppose the examples of TivaWare cannot work with TI-RTOS.

Please suggest an example link for Timer Interrupt and RTC for TI-RTOS.

  • Hi,

     Here is one example that uses the TivaWare to setup the timer and use the TI-RTOS's HWI to manage the timer interrupt. In this example the HWI is statically created but you can also create the HWI dynamically using Hwi_create(). 

    tm4c123_blinky_HWI_TIMER.zip

  • The RTC is associated with hibernation mode. The intent of a second clock is power saving in sleep mode while keeping time. Do your power requirements prevent you from using the main crystal or internal oscillator to track time?

    The only TivaWare functions (Im aware of) that conflict with the RTOS are the interrupt register functions. Hence why Charles cites using a HWI.

    Your error sounds like you need to include rom.h or rom_map.h or specify the target device. Many people have seen this error. Search for it.

    Have you read the hibernation chapter in the TivaWare User Guide? HibernateCalendarGet() seems promising.

  • Peter Borenstein said:
    specify the target device

    This helped a bit. At least the compile error is solved, so I know a target is to be specified to use ROM_.

    I defined : #define TARGET_IS_TM4C129_RA1 with the libraries rom.h and rom_map.h . Which I am not sure is right because I cannot find a reference between TM4C129x (blizzard series) and TM4C1294NCPD (which I have on my TIVA C board). 

    Peter Borenstein said:
    Do your power requirements prevent you from using the main crystal or internal oscillator to track time?

    Nope. Power constraint is not a priority for now.

  • Hi Peter,

    I am still facing the problem with Timer Interrupt and RTC. Although the compile error is gone as I mentioned before.

    For now I am thinking to use "Timestamp_get()" to use it as similar to "millis()" in Arduino platform if possible. But that will keep the controller busy for whole time.

    It will be helpful if you suggest necessary changes to use interrupt and RTC timestamp for SD in TI-RTOS for TM4C1294.