|

楼主 |
发表于 2021-7-15 19:03:36
|
显示全部楼层
补充,在sleep前后加了如下输出:
DelayMs(50);
Logs(0, "The 1th 50ms:%d\n", IWDT->CNT);
DelayMs(50);
Logs(0, "The 2th 50ms:%d\n", IWDT->CNT);
DelayMs(50);
Logs(0, "The 3th 50ms:%d\n", IWDT->CNT);
DelayMs(50);
Logs(0, "The 4th 50ms:%d\n", IWDT->CNT);
Sleep();
Logs(0, "Sleep:%d\n", IWDT->CNT);
结果为:
The 1th 50ms:17
The 2th 50ms:30
The 3th 50ms:43
The 4th 50ms:56
Sleep:0
The 1th 50ms:17
The 2th 50ms:30
The 3th 50ms:43
The 4th 50ms:56
Sleep:0
也就是唤醒后IWDT的计数自动变为0了! |
|