Zum Inhalt springen

WSAL20374 – RTC WatchDog HAT/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The Waveshare RTC WatchDog HAT pairs a high-precision RTC (DS3231) with a MAX705 watchdog that auto-resets when not fed. It is accessed over I2C and powered at 5 V.

Related products at JW Tech

Technical overview

  • RTC chip: DS3231SN, high-precision real-time clock
  • Watchdog chip: MAX705 with auto-reset function
  • Communication interface: I2C
  • Power supply: 5 V
  • Dimensions: 30.5 mm x 65 mm
  • Mounting hole diameter: 3.0 mm
  • Additional features: reset pin selection for switching the watchdog and an indicator for the watchdog output warning
  • Supported platforms: Raspberry Pi and RDK X3
  • Kernel driver can be enabled via /boot/config.txt
  • Sample code in C and Python is available

Commands and examples – verify before use: 

sudo apt-get install p7zip-full
wget https://files.waveshare.com/upload/b/bd/RTC_WatchDog_HAT.zip
7z x -tzip -y RTC_WatchDog_HAT.zip -o./RTC_WatchDog_HAT
sudo chmod 777 -R RTC_WatchDog_HAT
cd RTC_WatchDog_HAT/RTC
cd ~/RTC_WatchDog_HAT/RTC/c/ && make clean && make && sudo ./main
cd python/examples/ && sudo python main.py
echo "dtoverlay=i2c-rtc,ds3231" >> /boot/config.txt
sudo hwclock -w
sudo hwclock -s
sudo hwclock --set --date="9/8/2021 16:45:05"
sudo hwclock -r
sudo hwclock --verbose
sudo apt-get install nano
sudo nano rtc.py
sudo cp -r /home/sunrise/X3PI_RTC_WatchDog_HAT/ /root/X3
sudo chmod -R 777 /root/X3/RTC/python/examples/rtc.py
sudo nano /etc/rc.local

Notes and version constraints

  • The kernel driver method disables the provided demo scripts – do not mix both approaches.
  • When syncing system to hardware clock, network time sync must be disabled or it will overwrite your setting.
  • Watchdog timeout T depends on R and C; defaults yield about 157.08 s ±6%.
  • The date syntax shown in the example (9/8/2021 16:45:05) is outdated and should be updated before running.
  • The RDK X3 workflow assumes a specific directory (/home/sunrise/...); verify it exists on your system.
  • The Bullseye branch supports only Python 3 – older Python 2 scripts will not run.
  • All steps should be verified by a technician before deploying to production.

Source and revision record

  • RTC WatchDog HAT - Waveshare Wiki
  • Source revision: 103855
  • Captured: 2026-09-02T03:46:42+00:00
  • SHA-256: 057f37468df69a3796b3b62f2aeadc0215e05d9213e59a7dbac39fd55dd3727e