hello,
unfortunately, I can not find an example showing the use of the RTC module in TI-RTOS.
I only found the hibernation example without TI-RTOS.
I have installed this in a function in TI-RTOS.
That's how it works. When I wrap the file for the hibernation module #include <driverlib / hibernate.h>, I get the warning: 233-D declaration is not visible outside of function.
Can I use the RTC from the Hibernation module in Ti-RTOS?
Are there any better ways to use an RTC?
I have an external clock of 32,768kHz on XOSC0 / 1.
Here is my code under TI-RTOS in the file TM4C129EXL.c:
#include <driverlib/hibernate.h> void EK_TM4C129EXL_initHibernateMode(void) { SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE); HibernateEnableExpClk(SysCtlClockGet()); HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE); HibernateRTCEnable(); HibernateCounterMode(HIBERNATE_COUNTER_RTC); uint8_t i; for (i = 0; i < 100; ++i) { uint32_t secdec = HibernateRTCSSGet() * 1000/32768; // secdec ist 0.xx Sekunden System_printf("%d\n", secdec); System_flush(); } if(HibernateIsActive()) { _nop(); } else { _nop(); } }