RTC0 Doesn’t Work on Jetpack 6 with Battery but Works on Jetpack 5
Issue Overview
Users are experiencing issues with the Real-Time Clock (RTC0) on the Nvidia Jetson Orin Nano Dev board when using Jetpack 6 (version 36.3). The specific symptoms include:
-
Timeout Errors: When attempting to read the RTC0 with a battery attached, users encounter a timeout error. The command used is:
sudo hwclock --show --rtc=/dev/rtc0
The output indicates a timeout:
hwclock: select() to /dev/rtc0 to wait for clock tick timed out
-
Successful Reads Without Battery: When the battery is removed, the RTC can be read successfully, indicating that the issue is specifically related to the battery connection.
-
Comparison with Jetpack 5: Users noted that switching back to Jetpack 5 allows successful reads from RTC0, with time being stored correctly even after power removal. The dmesg logs show a significant difference in registration times for RTC0 between the two versions.
-
Device Tree Concerns: Users have compared device trees between Jetpack 5 and Jetpack 6 but are unsure about necessary modifications.
-
Additional Issues: There are also reports of problems dynamically setting GPIOs in Jetpack 6, although this issue appears to be separate from the RTC problem.
The issue is critical for users as it affects production timelines, and downgrading to Jetpack 5 is not feasible due to dependencies on Jetpack 6.
Possible Causes
Several potential causes for the RTC0 issue have been identified:
-
Hardware Incompatibilities: The custom carrier board may have hardware differences that affect RTC functionality specifically in Jetpack 6.
-
Software Bugs or Conflicts: There may be unresolved bugs or conflicts in the RTC driver for Jetpack 6 that do not exist in Jetpack 5.
-
Driver Issues: Changes in the driver code between Jetpack versions could lead to incompatibility or failure to recognize the RTC correctly.
-
Configuration Errors: Differences in device tree configurations between Jetpack versions may result in improper initialization of RTC0.
-
Environmental Factors: Power supply issues or battery compatibility could also contribute to the observed behavior, although this seems less likely given the successful operation under Jetpack 5.
Troubleshooting Steps, Solutions & Fixes
To address the issue with RTC0 on Jetpack 6, follow these troubleshooting steps and potential solutions:
-
Verify Software Version:
- Ensure that you are using Jetpack version R36.3.
- Command to check version:
cat /etc/nv_tegra_release
-
Check dmesg Logs:
- Compare dmesg outputs from both versions to identify differences in RTC registration.
- Command:
dmesg | grep rtc
-
Review Device Tree Configurations:
- Examine device tree files for any discrepancies that might affect RTC initialization.
- Focus on sections related to RTC and GPIO configurations.
- If necessary, consult Nvidia’s documentation for guidance on device tree modifications.
-
Inspect Driver Code:
- Review changes in
drivers/rtc/nvvrs-pseq-rtc.c
between versions. - Ensure that all necessary IRQ handlers and updates are correctly implemented.
- Pay attention to:
rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
- Review changes in
-
Test with Default Device Tree:
- If not already done, test using the default device tree provided with Jetpack 6 without modifications.
- This helps isolate whether custom configurations are causing issues.
-
Power Supply Check:
- Ensure that the power supply voltage levels are stable and within specifications for both the carrier board and battery.
-
GPIO Configuration Testing:
- Investigate GPIO configuration issues separately as they may indicate broader problems with pinmux settings or driver compatibility in Jetpack 6.
-
Consult Community and Documentation:
- Engage with Nvidia forums or support channels for additional insights or updates regarding known issues with RTC in Jetpack 6.
- Regularly check for firmware updates or patches that may address these issues.
-
Backup Plan:
- If all else fails and production timelines are critical, consider temporary workarounds such as maintaining a separate system running Jetpack 5 until a solution is found for Jetpack 6.
By following these steps, users can effectively diagnose and potentially resolve the issue with RTC0 on their Nvidia Jetson Orin Nano Dev board running Jetpack 6. Further investigation may be needed if problems persist despite these efforts.