主题 : 对于ClearPending的问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 29469
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2010-09-28
最后登录: 2011-08-07
楼主  发表于: 2010-10-25 23:58

 对于ClearPending的问题

请教一个ClearPending的问题#define    ClearPending(bit) {\
            rSRCPND = bit;\
            rINTPND = bit;\
            rINTPND;\
        }    
2440的英文手册中When the interrupt
sources request interrupt the service, the corresponding bits of SRCPND register are set to 1, and at the same time,,意思是可以同时多位为1,而INTPND一个时刻只能一个为1,那这样直接等于来清零的话,对其他位没影响吗?清零的话到底是置1还是置0呢?
级别: 新手上路
UID: 29469
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2010-09-28
最后登录: 2011-08-07
1楼  发表于: 2010-10-26 00:01

 回 楼主(sx0526) 的帖子

so the service routine must clear the
pending condition by writing a 1 to the corresponding bit in the SRCPND register first and then clear the pending
condition in the INTPND registers by using the same method.
好像解决了,手册上貌似说清零也是写1?