The ADSP-SC5xx/ADSP-215xx features CRC32 protection is implemented in hardware. The boot kernel provides mechanisms to allow each block to be verified using a 32-bit CRC. When building a loader file for CRC32 protection, use the -CRC32 <PolynomialCoefficient> switch.
Add -CRC32<PolynomialCoefficient> switch while generating the loader file. It uses the polynomial coefficient if specified, otherwise uses the default coefficient (0xD8018001).
Once the -CRC32 switch is invoked while generating the loader file, it appends an extra block which is basically used by the boot ROM to invoke the CRC32 initialization routine and then start processing each block one by one.
In each block, there is a 16byte header associated with this. The argument field in this comprise of the CRC checksum, which is compared with the generated checksum by the boot ROM based on the default/user-passed polynomial. So, all the block integrity is verified using this.
If any of the block CRC fails, it will be reported as an error by the boot ROM and the application will not boot itself.
Below steps is required:
The SSL application, will call the ROM API for main application with CRC switch enabled and Hook routine installed.
The hook routine, can be used to remap the error function pointer to loader application space.
It will jump to error handler in application space for any issues in processing the bootROM and that will also include CRC errors.
Inside the error handler function, call ROM API to boot a recovery application.
Please find the attached examples for ADSP-21569 and ADSP-SC584. In this, first it try to boot the application from the flash address 0x40000. If the loader file is corrupted, then it will try to boot the application from the flash address 0x80000.
So, create the loader file with -CRC32<PolynomialCoefficient> switch enabled and modify/remove the content. Load it at flash address 0x40000. Then load the correct file(app2) at flash address 0x80000.ADSP_SC584.zipADSP_21569.zip