Hi Earl
I tried reading all the registers. If the VBAT is connected to 3.3 v source, it gives the o/p. In case if it is floating then my program enters in hard fault. I am using the following code
/*lint -save -e970 Disable MISRA rule (6.3) checking. */
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
printf("testing starts\n");
/* Write your code here */
for(;;)
{
printf("%0X,%0X,%0X,%0X,%0X,%0X,%0X,%0X,%0X,%0X\n",RTC_TSR, RTC_TPR, RTC_TAR, RTC_TCR,RTC_CR, RTC_SR, RTC_LR,RTC_IER, RTC_WAR,RTC_RAR);
WAIT1_Waitms(2000);
}
the same code works if the VBAT is connected 3.3V.
Kind Regards
Amit Kumar