2.43.3 FCR_CRCCalculate Function
C
bool FCR_CRCCalculate (uint32_t startAddress, size_t length, uint32_t crcSeed, uint32_t * crc)
Summary
Computes the CRC for a specified memory region
Description
Configures CRC registers, performs the calculation, and retrieves the resulting CRC value.
Precondition
None
Parameters
Param | Description |
---|---|
startAddress | The starting memory address of the data block for CRC calculation. |
length | The length of the data block to be processed |
crcSeed | The initial seed value for the CRC calculation. |
crc | Pointer to store the resulting CRC value after computation. |
Returns
Always returns true.
Example
uint32_t crcSeed = 0xFFFFFFFF; // Initial CRC seed value uint32_t calculatedCrc = 0; // Variable to store the result uint32_t *crc = &calculatedCrc; // Pointer to the CRC result bool result = FCR_CRCCalculate(0xC008000U, 128, crcSeed, crc);