NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
TI81XX PSP WDT Driver User Guide
TI81XX refers to TI816X, TI814X and TI813X.
Introduction[edit]
Software stability is a major issue on any platform. Anyone who uses software has probably experienced problems that crash the computer or program in question. This is also true of embedded programs, and in most cases there is no user around to reset the computer when things go wrong. That job is occupied by the watchdog timer. The watchdog timer is a 16 bit counter that resets the processor when it rolls over to zero. The processor can reset the counter or turn it off, but, correctly used, it will reset the processor in case of a code crash. To avoid getting reset, the program must reset the timer every so often.
Details[edit]
2 instances: 1 System watchdog timer and 1 Security watchdog timer
* Free running 32-bit upward counter.
* Programmable divider clock source (2n with n=[0:7])
* On the fly read/write register (while counting)
* Reset upon occurrence of a timer overflow condition
Configuration[edit]
To enable/disable watchdog support, start the Linux Kernel Configuration tool:
$ make menuconfig
Select Device Drivers from the main menu.
... ... Power management options ---> [ ] Networking support ---> Device Drivers ---> ...
Select Watchdog Timer Support as shown here:
... ... < > Hardware Monitoring Support ---> < > Generic Thermal sysfs driver ---> [*] Watchdog Timer Support ---> ...
Select OMAP Watchdog as shown here:
--- Watchdog Timer Support [ ] Disable watchdog shutdown on close < > Software watchdog ---> <*> OMAP Watchdog ...
Note: Watchdog timer is enabled by default in the ti8168_evm_defconfig
Board Modification[edit]
Here is the description of the change in layout required for DM816x:
When PORZ was asserted the WD_OUT is held high. On EVM WD_OUT is connected to PORZ. This was causing a lock up condition and board would not come out of reset. We have changed the WD_OUT connection on EVM. We have added a pull down on WD_OUT. After this change when PORZ is asserted the WD_OUT is held low and lock up is prevented. The pull down value is chosen such that when WD_OUT is functionally driven high it causes PORZ to be asserted and cold reset DM816x.
The change in layout is circled RED in the following images :
(Click on the image to see the block diagram showing the change)
(Click on the image to see the change on the EVM)
Sample Applications[edit]
This chapter describes the watchdog sample application provided along with the package. The source for this sample application is available in the Examples directory of the Release Package folder.
1) Change the relative path of the kernel directory in the 'Makefile' as per your directory structure :
# Kernel base directory name with path KERNEL_DIR= <insert relative path to the kernel>
2) Compile the application using the 'make' command to obtain the executable :
$ make
3) Run the executable application (saWatchdog) on the EVM :
The application sets the watchdog reset time to 10 seconds by default (this can be changed in the source file as per the user's convenience). To test the watchdog's functionality, run the following two test cases on the EVM and check if the results are as expected.
$ ./saWatchdog <a value less than the watchdog reset time> (eg. $./saWatchdog 5)
$ ./saWatchdog <a value greater than the watchdog reset time> (eg. $./saWatchdog 12)
The application will keep writing values before the timeout in the first case, thus not restarting the system and keeping it going.
The application will get late in writing a value before the timeout in the second case, hence restarting the system.