Код: Выделить всё
/* STM32F7 default CRC-32 (Ethernet) */
#define CRC32_POLY 0x04C11DB7u
#define CRC32_INIT 0xFFFFFFFFu
uint32_t crc32_stm32_words(const uint32_t *data, uint32_t word_count)
{
uint32_t crc = CRC32_INIT;
for (uint32_t i = 0; i < word_count; i++)
{
crc ^= data[i]; // WORD XOR (no bit/byte reflection)
for (int bit = 0; bit < 32; bit++)
{
if (crc & 0x80000000u)
crc = (crc
Подробнее здесь: [url]https://stackoverflow.com/questions/79900788/crc32-mpeg-2-algorithm-implementation-on-fpga[/url]