1.nxp lpc1765,启动代码自己写的
2.ucosii网上下的,然后自己写汇编的,调好了
3.之后自己做了个uart0-3的驱动,进行调试,问题来了:
1)板子上有个GPS模块,每秒都会发数据,但是,一般都会跑了几分钟,就Hard Fault了,查了好久,最后锁定到移植代码上
2)板子异常后,
UFSR 的INVSTATE位是置1的,相关说明如下:
INVSTATE Invalid state usage fault:
0 = no invalid state usage fault
1 = the processor has attempted to execute an instruction that makes
illegal use of the EPSR.
When this bit is set to 1, the PC value stacked for the exception return
points to the instruction that attempted the illegal use of the EPSR.
This bit is not set to 1 if an undefined instruction uses the EPSR.
3)测试发现,建了4个任务,一直跑应该是没有问题的,但是只要开了UART2口中断(UART2口每秒都会进入中断,该中断处理程序已经把应用层代码屏蔽掉了),过一段时间就挂了
目前这个问题还在研究解决中,特此贴上,希望前辈指点!
|