we are using NAND-Boot mode on a BF548M system. After having
loaded and executed the initcode, we continue booting by calling
bfrom_NandBoot((s32)pBS->pSource, 0,0, NULL);
Before we do this we activate the block skipping mode with these lines:
ADI_BOOT_NAND *pND = (ADI_BOOT_NAND *)pBS->dUserLong; ... pND->EccParity.uwBlockSkipFeature = 1; pND->EccParity.uwBlockModifier = 1;
Our initcode is less than 10kB small. The whole project that must
be loaded however is about 2MB big, thus spanning 15 NAND blocks.
If all blocks are good, everything works fine.
If however one NAND block is bad the boot process stops as soon as
it is touched. We debugged so far that we see, that it reads the ECC data
of the bad block (first page) and then it reads the first 256 bytes of the data
area into the Prefetch buffer. We could identify these bytes (which are all
FF, because it's a bad block) in the scratchpad memory.
We are now wondering, why it reads these 256 bytes from the bad block at
all. Shouldn't it rather - after having read the ECC data - recognize, that the
block is bad, skip it and read the ECC data of the next block and continue
with that one ?
Perhaps there's something else to do to really activate the block skipping mode ?
We left the OTP data as we got it from the factory (in case that matters).
Any help would be greatly appreciated.