如何解决PIC24F系列的Address error问题?

2020-02-07 09:41发布

调试发现偶尔会重启,后来才搞清楚不用的中断和不可屏蔽陷阱默认都是执行reset指令,后来发现是“地址错误”,如何解决这种问题呢?
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
7条回答
zchong
2020-02-07 09:47
Datasheet上有这么一段:
All word accesses must be aligned to an even address. Misaligned word data fetches are not supported, so care must be taken when mixing byte and word operations, or translating from 8-bit MCU code. If a misaligned read or write is attempted, an address error trap will be generated. If the error occurred on a read, the instruction underway is completed; if it occurred on a write, the instruction will be executed but the write will not occur. In either case, a trap is then executed, allowing the system and/or user to examine the machine state prior to execution of the address Fault.

请问什么是mixing byte and word operations?

一周热门 更多>