/* 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) 在数据手册上 这个地址对吗 找不到这个地址啊
|