Maintaining RTC with Supercapacitor on Nvidia Jetson Orin Nano Dev Board
Issue Overview
Users of the Nvidia Jetson Orin Nano Dev board are exploring the possibility of replacing the traditional coin battery with a supercapacitor charging circuit on a custom board to maintain the Real-Time Clock (RTC). The main concerns revolve around the correct implementation and configuration of this alternative power source for the RTC, as well as identifying the correct RTC device to use in the system.
Key points of the issue include:
- Replacing the coin battery with a supercapacitor charging circuit
- Identifying the correct RTC device (/dev/rtc*) to read from
- Potential kernel configuration changes required for different software versions
- Ensuring proper RTC functionality and time synchronization
Possible Causes
-
Incorrect RTC device selection: The system may have multiple RTC devices, and selecting the wrong one could lead to improper time management.
-
Kernel configuration mismatch: Different software versions may require specific kernel configurations to properly recognize and utilize the RTC device.
-
Hardware compatibility issues: The custom supercapacitor charging circuit may not be fully compatible with the Jetson Orin Nano Dev board’s power management system.
-
Improper time synchronization: The system may not be correctly synchronizing with network time sources, leading to inaccurate RTC readings.
-
Software bugs: There could be bugs in the system software or drivers that affect RTC functionality.
Troubleshooting Steps, Solutions & Fixes
-
Identify the correct RTC device:
- Use the following command to list available RTC devices:
ls -l /dev/rtc*
- For the Jetson Orin Nano, the correct device is typically
/dev/rtc0
.
- Use the following command to list available RTC devices:
-
Check RTC functionality:
- Use the
hwclock
command to read the RTC:sudo hwclock -r -f /dev/rtc0
- If the time is incorrect (e.g., shows 1970-01-01), the RTC may not be properly maintained.
- Use the
-
Verify system time configuration:
- Use the
timedatectl
command to check system time settings:timedatectl
- Ensure that "System clock synchronized" is set to "yes" and "NTP service" is "active".
- Use the
-
Enable NTP synchronization:
- If NTP is not active, enable it with:
sudo timedatectl set-ntp true
- If NTP is not active, enable it with:
-
Update system time:
- Manually update the system time if needed:
sudo date -s "YYYY-MM-DD HH:MM:SS"
- Sync the hardware clock with the system time:
sudo hwclock --systohc
- Manually update the system time if needed:
-
Kernel configuration for RTC:
- For r35.x.x versions, you may need to modify the kernel image by changing
CONFIG_RTC_HCTOSYS_DEVICE
. - In r36.3 and later versions, this modification may not be necessary.
- To check the current configuration:
grep CONFIG_RTC_HCTOSYS_DEVICE /boot/config-$(uname -r)
- If modification is needed, edit the kernel configuration file and rebuild the kernel.
- For r35.x.x versions, you may need to modify the kernel image by changing
-
Verify supercapacitor circuit:
- Ensure the supercapacitor charging circuit is properly connected and functioning.
- Check the voltage across the supercapacitor to confirm it’s maintaining charge.
-
Monitor RTC behavior:
- Periodically check the RTC time after power cycles to ensure it’s maintaining the correct time.
- Use a script to log RTC time at regular intervals and after reboots.
-
Update system software:
- Ensure you’re running the latest version of the Jetson Linux:
sudo apt update && sudo apt upgrade
- Check for any available firmware updates for the Jetson Orin Nano.
- Ensure you’re running the latest version of the Jetson Linux:
-
Consult Nvidia documentation:
- Review the Jetson Linux Developer Guide for any specific RTC configuration requirements.
- Check the Nvidia Developer Forums for similar issues and solutions.
If the issue persists after trying these steps, consider reaching out to Nvidia support or the Jetson community forums for further assistance. Additionally, if you’re using a custom carrier board, ensure that the supercapacitor circuit design is compatible with the Jetson Orin Nano’s power management specifications.