STM32H725 possible bug in CRC peripheral with input data reflection
During porting by code from STM32F3 to STM32H7 i had the problem, that the calculated crc of my firmware was not computed correctly.
I found out, that on STM32H7 the reflection of the crc peripheral works not correctly if writing data smaller then 4 bytes into the data register of the crc unit.
So in my example, i write a single byte into data register. To get the correct result on STM32H7, i have to reconfigure the reflection to byte-wise instead of word-wise reflection like on STM32F3.
// result is wrong on STM32H7 and correct with STM32F3
hcrc->Instance->CR = CRC_CR_REV_OUT | CRC_CR_REV_IN_0 | CRC_CR_REV_IN_1;
hcrc->Instance->CR |= CRC_CR_RESET;
*(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = (uint8_t)data;
// if configure input reflection byte-wise on STM32H7, then the result is equal to STM32F3
hcrc->Instance->CR = CRC_CR_REV_OUT | CRC_CR_REV_IN_0 ;
hcrc->Instance->CR |= CRC_CR_RESET;
*(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = (uint8_t)data;Can anyone share his experiences with the crc unit on STM32H725?
