ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Functions

uint8_t SelfTest_EFuse_CheckSum (uint32_t startOffset, uint32_t length, uint32_t expectedCrc)
 Checks an accessible byte range within the eFuse customer region against a caller-provided reference CRC32.

Function Documentation

◆ SelfTest_EFuse_CheckSum()

uint8_t SelfTest_EFuse_CheckSum ( uint32_t startOffset,
uint32_t length,
uint32_t expectedCrc )

Checks an accessible byte range within the eFuse customer region against a caller-provided reference CRC32.

Every byte is read through the PDL eFuse API. Any failed read or CRC mismatch causes the test to fail.

The IP header supplies the start of CUSTOMER_DATA. No absolute OTP address is accepted from the caller. The CRC uses SelfTests_CRC32_Byte over bytes in ascending offset order, starting with CRC32_INIT_VALUE (0xFFFFFFFF), without a final XOR. Standard CRC-32/IEEE yields a different reference and must not be substituted.

Parameters
startOffsetFirst byte relative to the customer region (not the physical eFuse address). Valid together with length only if the complete range fits within the customer region.
lengthNumber of customer bytes to test. Must be greater than zero. The region is 24 bytes on XMC7100 and XMC7200.
expectedCrcExpected CRC for exactly the selected bytes. The integrator must establish this value independently, for example during provisioning, and store it outside the tested region.
Returns
OK_STATUS - All reads succeeded and the CRC matches.
ERROR_STATUS - Failed read or CRC mismatch.
ERROR_BAD_PARAM - Invalid customer-relative range.