2019-01-28 04:55 PM
I found a bug the HAL CRC Module...
First of all... when you enable the CRC Module with CubeMX 5.0.1 the MX_CRC_Init() is empty and the peripheral is not initalized!
I wrote all the code manualy or copied it from the old CubeMX 4 generated code...
This worked BUT... when using hcrc.Init.CRCLength = HAL_CRC_LENGTH_8B the CRC->CR->POLYSIZE Register is set wrong. It is set to 0x01 what means 16 Bit CRC and not 0x02 wicht would be 8 Bit.
When you use hcrc.Init.CRCLength = HAL_CRC_LENGTH_16B; the CR->POLYSIZE Register is set to 8 Bit (0x02)... so it seems to be flipped arround...
I did no further investigation on this bug... dont know where the problem realy is...
But i guess, this is STs task.
Best regards
2019-01-29 01:04 AM
Hello,
Can you please share your ioc file for check.
Kidn Regards,
Imen
2019-01-29 02:12 AM
Hello @Christopher Müller
Can you please share your ioc file or your MCU for check.
Best Regards,
Wael
2019-01-29 05:07 AM
2019-01-29 06:03 AM
Hi @Christopher Müller
Your request has been sent to the development team. it will fix in the next version CubeMX
Best Regards,
Wael
2019-01-29 06:05 AM
Please be aware of that it is NOT ONLY a problem with the cube MX but also the HAL itself!
hcrc.Init.CRCLength = HAL_CRC_LENGTH_8B comes from HAL not from Cube MX... and this sets the register of STM32L082 wrong. It is a bug in HAL.
2019-01-29 06:07 AM
Yes I made a total description of what you want.