从AM335X的技术参考手册可以找到关闭看门狗的流程 (如下)
To disable the timer, follow this sequence:
1. Write XXXX AAAAh in WDT_WSPR.
2. Poll for posted write to complete using WDT_WWPS.W_PEND_WSPR.
3. Write XXXX 5555h in WDT_WSPR.
4. Poll for posted write to complete using WDT_WWPS.W_PEND_WSPR.
To enable the timer, follow this sequence:
1. Write XXXX BBBBh in WDT_WSPR.
2. Poll for posted write to complete using WDT_WWPS.W_PEND_WSPR.
3. Write XXXX 4444h in WDT_WSPR.
4. Poll for posted write to complete using WDT_WWPS.W_PEND_WSPR.
#define WDT_WWPS (*(volatile unsigned long *)0x44e35034)
#define WDT_WSPR (*(volatile unsigned long *)0x44e35048)
void stop_wdt(void)
{
/*1. Write XXXX AAAAh in WDT_WSPR.*/
WDT_WSPR = 0x0000aaaa;
/*2. Poll for posted write to complete using WDT_WWPS.W_PEND_WSPR.*/
while((0x00000000 !