1.50 CLASSB_FlashCRCGenerate
Function
uint32_t CLASSB_FlashCRCGenerate(uint32_t start_addr, uint32_t test_size);
Summary
Generates CRC-32 checksum for a given memory area.
Description
This function runs CRC-32 algorithm with the polynomial 0xEDB88320 and returns the generated checksum. It uses table based approach where the table is generated during the execution. It uses 0xffffffff as the initial value.
Precondition
None.
Parameters
start_addr - Starting address of the memory block.
test_size - Size of the memory block.
Returns
CLASSB_TEST_STATUS - Status of the test.
Example
uint32_t crc_val = 0; // Generate CRC-32 for the internal Flash. crc_val = CLASSB_FlashCRCGenerate(0, 0xFE000);
Remarks
This function is used inside the Class B library to generate CRC-32 of the internal Flash memory but it can be used on any contiguous memory area.