Error in HAL_CRC_Init function
There is no actual code that initializes CRC module beetwen these lines:
/* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_BUSY; /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_READY;
There should be something like this
/* Reset CRC generator */ CRC->CR = CRC_CR_RESET;