AnsweredAssumed Answered

How to calculate CRC for large file in STM32F030RC

Question asked by Treacy Yao on Feb 3, 2018
Latest reply on Feb 6, 2018 by Martin Straub

I want to calculate CRC for large file, the large file have been added the CRC value in the end of the whole .bin file(Get this CRC data via IAR tool). I read the file and calculate CRC of it in part(HAL_CRC_Calculate(&CrcHandle,  (uint32_t *)data, len).  So I will get lots of crc data because I read it in part.

1. How can I deal with these crc data then the final crc vlue will be equal to the one calculated in the IAR?

2. Will it be any prolem if the last file part is not divided to 4 bytes(Considered the Byte alignment), then cause the final CRC data is not equal to the one calculated in the IAR? How to deal with this problem?

Outcomes