Tool/software: TI-RTOS
I am interested in using the on board RTC without including all of the files that their examples use.
Following their documentation:
How do you do #1 & #3 with a simple register call?
So far I have the simple:
#define SOC_RTCSS_REG (0x44e3e000U) // Define register locations #define RTCSS_CTRL_REG_ADDR (SOC_RTCSS_REG + 0x40) #define RTCSS_OSC_REG_ADDR (SOC_RTCSS_REG + 0x54) #define RTCSS_STS_REG_ADDR (SOC_RTCSS_REG + 0x44) #define RTCSS_KICK0R_ADDR (SOC_RTCSS_REG + 0x6C) #define RTCSS_KICK1R_ADDR (SOC_RTCSS_REG + 0x70) //Macro to access the passed register #define RTC_REG(addr) *((volatile uint32_t*)addr) Initialize() { //Turn off Write Protect RTC_REG(RTCSS_KICK0R_ADDR) = 0x83E70B13; RTC_REG(RTCSS_KICK1R_ADDR) = 0x95A4F1E0; RTC_REG(RTCSS_OSC_REG_ADDR) = 0x0; //Using Internal Clock Source RTC_REG(RTCSS_CTRL_REG_ADDR) = 0x1; //RTC is running }