Closed milosfec closed 3 years ago
Describe the bug Real HW requires calling __HAL_RCC_CRC_CLK_ENABLE(); prior to using CRC32 calculation, but on the simulator it works even without enabling the clock.
__HAL_RCC_CRC_CLK_ENABLE();
To Reproduce
static inline uint32_t crc32(const uint32_t *buffer, uint32_t length) { CRC->CR = CRC_CR_RESET; while (length--) { const uint32_t word = *((uint32_t *)buffer++); CRC->DR = __RBIT(word); } return __RBIT(CRC->DR) ^ 0xFFFFFFFF; }
Expected behavior Mentioned function should return 0xFFFFFFFF unless __HAL_RCC_CRC_CLK_ENABLE(); is called prior to calling the function.
Describe the bug Real HW requires calling
__HAL_RCC_CRC_CLK_ENABLE();
prior to using CRC32 calculation, but on the simulator it works even without enabling the clock.To Reproduce
Expected behavior Mentioned function should return 0xFFFFFFFF unless
__HAL_RCC_CRC_CLK_ENABLE();
is called prior to calling the function.