13.12.6 Mismatch Condition

If the CRC-on-boot module detects a mismatch between the calculated check value and the expected value for the boot section, three events occur:

  • The output pin of the CRC-on-boot module (if any is selected) remains driven low.
  • The B0 bit of the BOOTREG register remains ‘0’.
  • The module checks the BCOE Configuration bit. If it is clear, the module will continue to the non-boot CRC check (if enabled), otherwise, it will continue to user code. If it is set, the module will halt and not execute any further code.

If the CRC-on-boot module detects a mismatch between the calculated check value and the expected value for the non-boot section, three events occur:

  • The output pin of the CRC-on-boot module (if any is selected) remains driven low
  • The B1 bit of the BOOTREG register remains ‘0’.
  • The module checks the COE Configuration bit. If it is clear, the module will continue to user code. If it is set, the module will halt and not execute any further code.

If a mismatch is not detected in a section (or if scanning of that section is disabled), the associated bit of BOOTREG associated with that section (B0 for boot, B1 for non-boot) will be set. If all calculated CRC check values match their expected values, the output pin of the CRC-on-boot module (if any is selected) will be either driven high or released (depending on the ODCON Configuration bit) and user code will be executed beginning from the Reset vector.