Hello Everyone,
I am working with TMS320C5515 ezDSP kit and would like operate the processor in RTC only mode. I have included the c55xx_csl API library in my project and was able to successful execute the RTC example provided along with the library. But, the RTC registers RTCINTREG, RTCINTEN and RTCPMGT do not take the values as mentioned in the RTC user guide. These registers are defined in the csl_rtcregs struct but equating values to the struct registers do not configure the registers in hardware.
Also, as per http://processors.wiki.ti.com/index.php/C55xx_RTC_ONLY_MODE_SUPPORT I have tried configuring the registers using asm instructions but I was not successful.
Find below the code used to configure the registers
void rtc_regConfig(void)
{
Uint16 temp1920, temp1924, temp1930;
/* Structure of RTC registers */
CSL_RtcRegs rtcRegs;
/* Using rtc */
rtcRegs.RTCINTFL = 0x803Fu;
rtcRegs.RTCINTEN = 0x0001u;
rtcRegs.RTCINTREG = 0x0020u;
rtcRegs.RTCPMGT = 0x0000u;
do
{
temp1924 = rtcRegs.RTCINTREG;
}while((temp1924 & 0x0020) == 0);
temp1920 = rtcRegs.RTCINTFL;
if(temp1920 != 0)
{
rtcRegs.RTCINTFL = 0x803Fu;
}
rtcRegs.RTCPMGT = 0x0006u;
rtcRegs.RTCINTFL = 0x803Fu;
/* Using asm to configure the registers. But unsuccessful */
asm("*port(#0x1920) = #0x803F");
asm("*port(#0x1900) = #0x0001");
asm("*port(#0x1924) = #0x0020");
asm("*port(#0x1930) = #0x0006");
/* Tried configuring directly using CSL_RTC_REGS pointer */
CSL_RTC_REGS->RTCINTREG = 0x0020;
CSL_RTC_REGS->RTCPMGT = 0x0006;
}
Could anyone let me know how I could configure the RTC registers?
Thanks