flash signature generation question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

flash signature generation question

514件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jpplus on Thu Jan 08 00:07:39 MST 2015
I am working to generate the signature of chip LPC4337. But now the reference signature is different with one generated by embedded side. But I am not pretty sure which side has problem.
Does LPC has some reference or sample code to gererate reference signature or embedded code to generate signature?
I would take this to verify whether embedded side or PC side has problem.
Blow agorithm looks simple, but I cannot get the matched results. BTW, I am use 16 bytes to test.
---------------------------------------------------------------------------------------------------------------------------
sign = 0
FOR address = FMSTART.FMSTART TO FMSTOP.FMSTOP
{
FOR i = 0 TO 126
nextSign = f_Q[address] XOR sign[i+1]
nextSign[127] = f_Q[address][127] XOR sign[0] XOR sign[2] XOR
sign[27] XOR sign[29]
sign = nextSign
}
signature128 = sign
ラベル(1)
0 件の賞賛
返信
1 返信

419件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jpplus on Sun Jan 11 17:33:44 MST 2015
BTW, if I run the code like below, if I run the program address is not from 0x1A000000, it will cause hard fault, and if I run this program addres start from 0x1A000000, then it can run. But the results generated are not same from the reference signature.
I believe my reference signature should be correct, so the reason might be the embedded side.
Any help or hint?


//clear complete flag
LPC_FMC->FMSTATCLR = (1 << 2);

LPC_FMC->FMSSTART = (startAddr>>4) & 0x0001ffff;;

LPC_FMC->FMSSTOP = ((startAddr + numBytes)>>4) & 0x0001ffff;;

LPC_FMC->FMSSTOP |= (1 <<17);// start the signature generation

while( !(LPC_FMC->FMSTAT & (1 << 2)) ); //wait till signature generation is complete

LPC_FMC->FMSTATCLR = (1 << 2);

0 件の賞賛
返信