I have an embedded system with an ADSP-BF703 which boots from a flash memory connected to SPI2. The flash memory will contain 2 identical copies of the application to provide a backup copy in case the first copy becomes corrupted. Is it possible to use the CRC32 checking built in the boot process to switch to the alternate dxe if an error is detected? The documentation mentions that the CRC polynomial get initialized in the init block. It's not clear about the callback for error handling. Is there more information on the callback and can you outline a recommended implementation of the backup boot feature?
Hello,When you use the -CRC32 switch, the elfloader inserts an init code call to an internal ROM function on the ADSP-BF70x that performs the CRC check. From the Loader Manual:The -CRC32 (polynomial coefficient) switch directs the loader utility to generate CRC32 checksum. Use a polynomial coefficient if specified; otherwise, use default 0xD8018001.This switch inserts an initcode boot block that calls an initialization routine residing in the on-chip boot ROM. The argument field of the boot block provides the used polynomial. The loader utility calculates the CRC checksum for all subsequent data blocks and stores the result in the block header's argument field.Then you need to use an initcode and generate a loader file, we can find 3 DXEs in the loader file.First is for initializing the CRC32 init. 2nd is user initcode and 3rd is user program(Application 1).When the CRC32 checksum calculation result and the value in the ARGUMENT of the block header are different, by default the boot kernel call the default Error Handler that is set in the pErrorFunction(idle loop) in the ADI_BOOT_DATA. You can customize the Error Handler in user initcode by initializing your own handler pErrorFunction in the ADI_BOOT_DATA. Please refer the Hardware reference manual of the ADSP-BF70x on section "Error Handler" in the chapter "Boot Rom and Booting the processor" for more information about the error handler."In the error handler, you can make a call of Second stage loader(ssl) function and which invokes a another back up application of yours.Please refer the application note EE-374: Implementing Second-Stage Loaders on ADSP-BF707 Blackfin® Processors (Rev. 1) and associated example for implementing a SSL application.www.analog.com/.../EE374v01.pdfRegards,Anand Selvaraj.