请问各位大侠:
FLASH的坏块的标记不是在00B的第6个字节码,那么下面的怎么会传递给R1,6呢,应该是5啊,
517字节%512=5啊。
希望大家能够指点 谢谢
CheckBadBlk
mov r7, lr
mov r5, #NFCONF
bic r0, r0, #0x1f ;addr &= ~0x1f;
ldr r1,[r5,#4] ;NFChipEn()
ldr r2,=0xfffc
and r1, r1, r2
orr r1, r1, #1
str r1,[r5,#4]
mov r1,#0x50 ;WrNFCmd(READCMD2)
strb r1,[r5,#8]
mov r1, #6 ;WrNFAddr(6)
strb r1,[r5,#0xc]
strb r0,[r5,#0xc] ;WrNFAddr(addr)
mov r1,r0,lsr #8 ;WrNFAddr(addr>>8)
strb r1,[r5,#0xc]
cmp r6,#0 ;if(NandAddr)
movne r0,r0,lsr #16 ;WrNFAddr(addr>>16)
strneb r0,[r5,#0xc]
bl WaitNandBusy ;WaitNFBusy()
ldrb r0, [r5,#0x10] ;RdNFDat()
sub r0, r0, #0xff
mov r1,#0 ;WrNFCmd(READCMD0)
strb r1,[r5,#8]
ldr r1,[r5,#4] ;NFChipDs()
orr r1,r1,#0x2
str r1,[r5,#4]
mov pc, r7 |