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.

CC2538: Use of RTC

Part Number: CC2538

Hi,
Iam trying to set the RTC in CC2538, but it was not at all starting, I was always getting same time what I was set. For further detail please check my code

  // Setting Real time //
  UTCNewTime->seconds = '0';
  UTCNewTime->minutes = '30';
  UTCNewTime->hour = '11';
  UTCNewTime->day = '21';
  UTCNewTime->month = '8';
  UTCNewTime->year = 17;
  
  NewTime = osal_ConvertUTCSecs(UTCNewTime);
  printf("set time = %d\n", NewTime);

  osal_setClock(NewTime);

  while(1){

  CurrentTime = osal_getClock();
  printf("cur time = %d\n", CurrentTime);
  
  osal_ConvertUTCTime(UTCCurrentTime, CurrentTime);

  }

I was always getting set time has new time,

Thanks,
Ragards,
Raghu DS