21ic电子技术开发论坛 已关闭版块 恩智浦MCU论坛 MC9S12HY64单片机的看门狗设置
发新帖我要提问
返回列表
打印
[8/16-bit MCU]

MC9S12HY64单片机的看门狗设置

[复制链接]
1185|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
tao180539|  楼主 | 2015-11-2 16:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
/* COP macros */
#if defined(_HCS12) || defined(HCS12) || defined(__HCS12__) || defined(__XGATE__)
#define _COPCTL_ADR  (0x34+0x08)
#define _COP_RST_ADR (0x34+0x0B) /* ARMCOP */
#else
#define _COPCTL_ADR  0x16
#define _COP_RST_ADR 0x17
#endif

/* Note COPCTL is write once. */
#define _ENABLE_COP(period)   ((*(volatile unsigned char*)_COPCTL_ADR)= (period)) /* Note: 7 longest possible COP duration. 0 == COP disabled. */
#define _ENABLE_COP_X() _ENABLE_COP(7) /* as long as possible */
#define _DISABLE_COP() _ENABLE_COP(0x00) /* COP is disabled if period is 0 */
#define _FEED_COP()   ((*(volatile unsigned char*)_COP_RST_ADR)= 0x55,(*(volatile unsigned char*)_COP_RST_ADR)= 0xAA)

关闭看门狗的时候 写入的寄存器是  _COPCTL_ADR  (0x34+0x08)   在数据手册上 这个地址对吗  找不到这个地址啊

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

321

主题

514

帖子

3

粉丝
关闭 热门推荐
快速回复 在线客服 返回列表 返回顶部