cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX does not allow setting CRC Polynomial

caco3
Associate II
Posted on September 29, 2015 at 12:22

I want to set the CR polynomial according to the most top table in http://users.ece.cmu.edu/~koopman/crc/index.html

However STM32CubeMX does not allow to do it due to the following restrictions:

----

CRCPolynomial should respect this format : Xa+Xb+...+Xc.

where a,b,c are the powers of the polynomial :

- a,b,c should be less than 8.

- a,b,c should be odd.

----

Why is this restriction?

How can I work around it?

The generated function MX_SPI1_Init() does not allow user code in it, so I would have to modify it evertime I run STM32CubeMX generation!

I seem not to be the first one with this issue:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32CubeMX%204.9.0%20issues&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32CubeMX%204.9.0%20issues&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21

#crc-stm32cubemx-crcpolynomial
1 REPLY 1
Amel NASRI
ST Employee
Posted on January 06, 2016 at 15:13

Hi CaCO3,

Sorry for this delayed answer.

I want to keep you informed that the reported issue is already fixed in CubeMX with the last 2 versions.

This restriction is wrong. In fact the polynomial has be odd, not its powers.

So it should respect the format: X0+Xa+Xb+....+Xc.

The powers have to be less tahn 8.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.