/* Calculate the CRC32 value and start with the specified initial value.  */
uint32_t CRC_CRC32_Calculate(uint32_t u32InitValue, uint8_t u8DataWidth, const void *pvData, uint32_t u32Len)
/* Calculate the CRC32 value and start with the specified initial value.  */
uint32_t CRC_CRC32_Calculate(uint32_t u32InitValue, uint8_t u8DataWidth, const void *pvData, uint32_t u32Len)
{
    uint32_t u32CrcValue = 0UL;
    if ((pvData != NULL) && (u32Len != 0UL)) {
        WRITE_REG32(CM_CRC->RESLT, u32InitValue);
        u32CrcValue = CRC_CRC32_AccumulateData(u8DataWidth, pvData, u32Len);
    }
    return u32CrcValue;
}