AnsweredAssumed Answered

32- bit CRC Calculation of flash for STM32F070xB

Question asked by Priyadarshini Solanki on Jan 25, 2018
Latest reply on Feb 1, 2018 by Priyadarshini Solanki

I am using stm32f070xb, where I tried to calculate the 32- bit CRC of my flash using crc->dr register.

How I can ensure if the CRC calculation of my flash is correct.


CRC Configuration I used is :

hcrc.Instance = CRC;
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;
hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;
hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;


/*ROM address*/

#define ROM_START (( uint32_t * ) 0x08000000 )
#define ROM_END (( uint32_t * ) 0x0801FFFB )


Calculated CRC is stored in the variable.