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.

BEAGLEBK: How to automatically set system time by external DS3231

Part Number: BEAGLEBK

Hi,

I am using beagle Bone Black with debian image. Could any please suggest how to automatically set the system time (on every reboot) by external RTC module DS3231. Once internet is connected, i want to update both system time and DS3231 with the network time.

I am controlling a relay based on system time, my application should take DS3231 time and run perfectly even if internet is disconnected and not available for so many days.

Few things i have tried, the following content has been kept in the script and running @reboot script in crontab. The system time has been changed if we enter this command manually after boot but not in auto start script. Please advice.

echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

hwclock -r -f /dev/rtc1

Best regards,

NK

  • Hello NK,

    We support TI-specific questions on these forums. So if you were asking a question specific to TI software or TI hardware, then I could help you. However, you will have to search for answers elsewhere because:

    * We only support TI's software on these forums. So I can help you with TI's Linux Processor SDK, but I am not able to help with debian.
    * DS3231 is not a TI part. So we cannot help debug if that part is causing the issue.
    * hwclock is generic Linux software, not TI-specific software. You can find documentation for it elsewhere on the internet.

    If you have any TI-specific questions in the future, please feel free to create a new thread and we can help you then!

    Regards,

    Nick