目录
CPU 和安全看门狗
AP32221
1 简介 .......................................................................5
1.1 对读者说 ....................................................................5
1.2 范围和目的 ..................................................................5
1.3 缩略词 ......................................................................5
1.4 参考文献.....................................................................5
2 看门狗定时器(WDTs) ..........................................................6
2.1 概况 ........................................................................6
2.2 看门狗定时器特性.............................................................8
2.3 看门狗定时器寄存器...........................................................9
3 ENDINIT 功能................................................................11
3.1 概况 ........................................................................11
3.2 对 WDTxCON0 寄存器的密码访问..................................................11
3.2.1 静态密码.....................................................................12
3.2.2 自动密码序列.................................................................12
3.2.3 与时间无关的密码.............................................................13
3.2.4 时间检查的密码...............................................................13
3.3 对 WDTxCON0 寄存器的检查访问..................................................13
3.4 对 WDTxCON0 寄存器的修改访问..................................................14
3.5 访问受 ENDINIT 保护的寄存器...................................................15
4 定时器操作.................................................................16
4.1 概况 .......................................................................16
4.2 定时器模式..................................................................17
4.2.1 超时模式....................................................................17
4.2.2 正常模式....................................................................17
4.2.3 停用模式....................................................................17
4.3 喂狗........................................................................18
4.4 省电模式期间 WDT 看门狗的操作................................................18
4.5 暂停模式支持................................................................19
5 执行和用途.................................................................20
5.1 初始化看门狗................................................................ 20
5.2 清除 ENDINIT 保护............................................................ 21
5.3 设置 ENDINIT 保护.............................................................22
5.4 喂狗.........................................................................23
5.5 更改 ENDINIT 密码.............................................................23
5.6 更改 WDT 重载值...............................................................24
5.7 使能看门狗...................................................................24
5.8 停用看门狗...................................................................25
5.9 获取 ENDINIT 密码.............................................................25
6 附录.........................................................................26
6.1 示例代码:WDT 在启动时初始化..................................................26
6.2 示例代码运行时间 WDT 重新配置..................................................27
应用笔记
4
V1.0, 2014-5