ADSP-BF50x Blackfin Processor Hardware Reference
24-87
System Reset and Booting
In general, the block size is bigger than the size of the temporary buffer.
Therefore, the boot kernel may need to divide the processing of a single
block into multiple steps. The callback routine may also need to be
invoked multiple times—every time the temporary buffer is filled up and
once for the remaining bytes. The boot kernel passes the
dFlags
parame-
ter, so that the callback routines knows whether it is called the first time,
the last time or neither. The
dUserLong
variable in the
ADI_BOOT_DATA
structure is used to store the intermediate results between function calls.
Listing 24-7. XOR Checksum
s32 xor_callback(
ADI_BOOT_DATA* pBS,
ADI_BOOT_BUFFER* pCS,
s32 dFlags)
{
s32 i;
if ((pCS!= NULL) && (pBS->pHeader!= NULL)) {
if (dFlags & CBFLAG_FIRST) {
pBS->dUserLong = 0;
}
for (i=0; i<pCS->dByteCount/sizeof(s32); i++) {
pBS->dUserLong^= ((s32 *)pCS->pSource)[i];
}
if (dFlags & CBFLAG_FINAL) {
if (pBS->dUserLong!= pBS->pHeader->dArgument) {
idle ();
}
}
}
return 0;
}
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...