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.

Linux/AM5728: RTC resets to default after reboot

Part Number: AM5728

Tool/software: Linux

Hi,

I m using yocto psdk-04.02.00.09. I have a externeal RTC ( MCP79410 ) in custom design and a battery connected to it.

I have verified the voltage and the crystal oscillator frequency which is supplied to the RTC in powered off time. Hardware wise it seems fine.

RTC using driver rtc-ds1307.c file.

Following the below procedure to set the time in system clock and HW clock :

root@am57xx-evm:~# date -s '2019-05-15 16:34:56'
Wed May 15 16:34:56 UTC 2019
root@am57xx-evm:~#
root@am57xx-evm:~# date
Wed May 15 16:34:58 UTC 2019
root@am57xx-evm:~#
root@am57xx-evm:~# hwclock -w
root@am57xx-evm:~#
root@am57xx-evm:~# hwclock --show
Wed May 15 16:35:13 2019  0.000000 seconds
root@am57xx-evm:~#

The default date and time after every reboot :

Mon Apr 29 05:17:45 UTC 2019

Even i have followed the below link and modified the Device Drivers > Real Time Clock > TI OMAP Real Time Clock to built-in (* instead of M)

Somewhere in driver or at the time of system boot, RTC getting the default time.

How to overcome this issue ? Please provide me the guidance.