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);