搞2220,一开始碰到不能启动的问题,后来碰到看门狗的问题。 看门狗不能够正确的复位,真是无招了.....
看门狗的问题后来我解决了,是程序的问题,还想提一个问题 就是启动的问题: ISP BOOT是不是校验和为零就可以启动? 我的程序很怪,非要这样才能启动: .text .align 4 .global _start .global Reboot
_start: B SystemReset B SystemReset B SystemReset B SystemReset LDR PC, DataAbort .long 0xA3400FF2 LDR PC, [PC, #-0xFF0] B SystemReset
DataAbort: .long 0x80000024
SystemReset: LDR R0, =0xFFFFF014 @关闭所有中断 LDR R1, =0xFFFFFFFF STR R1, [R0]
MRS R0, CPSR ORR R0, R0, #0x80 MSR CPSR, R0
LDR R0, =0xE0000000 MOV R1, #0 STR R1, [R0]
LDR R0, =0xE002C014 LDR R1, =0x0F814920 STR R1, [R0]
LDR R0, =0xFFE00000 LDR R1, =0x1000FFEF STR R1, [R0]
LDR R0, =0xFFE00004 LDR R1, =0x2000FFEF STR R1, [R0]
LDR R0, =0xFFE00008 LDR R1, =0x0000FFEF STR R1, [R0]
LDR R0, =0xFFE0000C LDR R1, =0x00002400 STR R1, [R0]
MSR CPSR_c, #0xD2 LDR SP, =0x40010000
MSR CPSR_c, #0xD3 LDR SP, =0x4000E000
LDR R0, =0x80000000 MOV R1, #0x40000000 MOV R2, #0xC000 CopyProgram: LDR R3, [R0], #4 STR R3, [R1], #4 SUBS R2, R2, #4 BNE CopyProgram
LDR R0, =0xE01FC040 MOV R1, #2 STRB R1, [R0] MRS R1, CPSR BIC R1, R1, #0x80 MSR CPSR, R1
LDR R0, DataAbort LDR R1, =SystemReset STR R1, [R0]
LDR PC, =Startup
Reboot: LDR PC, =0x80000000
|