Post Go back to editing

Add SPI communication in init code

I am currently using 2156x series chips. During the boot process, I configured the DSP to boot from SPI2 slave mode, and turned on the CRC32 check switch. In the Init code, I added the event handling of the CRC32 check failure.

I want to transmit the event value to the host through the MISO pin of SPI2 when the verification fails. I don't know if this is feasible? If it is feasible, is there an implementation example for me to refer to?

I tried to add spi2 to call the API configuration function in the init code, but it compiled an error. I consulted the relevant manuals, the manual mentioned that the init code code cannot include calls to the runtime library. Can this function be realized in register writing mode?

  • Hi,

    The ADSP-2156x features CRC32 protection which is implemented in hardware. The boot kernel provides mechanisms to allow each block to be verified using a 32-bit CRC. The boot rom contains a function in the rom that can be called as an initcode to register the CRC callback and initialize the CRC peripheral with a user specified polynomial. To enable this feature an Init Block must be located in the boot stream with a TARGET_ADDRESS that points to the adi_rom_Crc32Init() function in the ROM. The ARGUMENT field contains the CRC32 checksum polynomial to be used to initialize the CRC lookup table. Once this CRC initcode function in the ROM has been executed CRC verification is enabled for all subsequent blocks except Ignore and First block.

    The utilities provided by the supporting toolchain for the processor allow for generation of CRC32 protected loader streams. When building a LDR file for CRC32 protection, use the -CRC32 <PolynomialCoefficient> switch. The -CRC32 switch directs the loader to generate CRC32 checksums. It uses the polynomial coefficient if specified, otherwise uses the default coefficient (0xD8018001).

    We would suggest you to refer the CRC32 Protection (Page No:1805/2331) and Boot ROM Programming model(Page No:1817/2331) . The link for the ADSP-2156x Hardware Reference Manual is given below.

    Anand Selvaraj.