AnsweredAssumed Answered

CRC setup for enhanced images

Question asked by Dan Ander on Jun 17, 2019
Latest reply on Jul 5, 2019 by Dan Ander

Trying to boot a dual boot image with a CRC.


Situation: a firmware update image and a main image.


I swap back and forth by updating the "Boot block structure" version number. [ie if you go to boot mode and change your mind on reboot you will go back to the main image].


I have already setup and booted via dual image without the CRC so that part has been tested.


More or less I plan to inject the CRC into the Boot block structure after writing the main image to flash.


I have setup the main "Boot block structure" like so:

{0xFEEDA5A5, 0x00000000, 0x00000000, 0x8000, 0x00000000, 0x00000003 };

The value 0x8000 is the CRC length

The next index will hold the injected CRC


I use the LPC's CRC engine to get my CRC.

Here is the setup I used:

    config.polynomial = kCRC_Polynomial_CRC_32;
    config.reverseIn = false;
    config.complementIn = false;
    config.reverseOut = false;
    config.complementOut = false;
    config.seed = 0xFFFFFFFF;


    CRC_Init(CRC_ENGINE, &config);


Problem: On boot the image will no longer load.  Assume the CRCs do not match


Tried different CRC configurations, looked through the manual, online.... found nothing for a guiding light


where oh where is that little light of hope.


ps the CRC is suppose to solve the update getting interrupted and [from the customers perspective] bricking the device.