cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Foxx CRC: usage of HAL Drivers

stanzanim
Associate III
Posted on April 15, 2016 at 14:34

I want to make the CRC progress as soon as I receive bytes so I want to calculate partial CRCs as soon as the packet is entering the system. Should I use 

HAL_CRC_Accumulate with buffer size =1?

I also deal with bytes incoming and want to get a 16 bit CRC. Should I simply cast to (uint_16 the 32 bit results)

I cannot fing so many C example on the web ... some initial questions 

- how can I setup the peripheral to work with 8 bit data and generating a 16bit CRC?

- how can I set a generator polynomial for MODBUS (0xA01 16 bits)? It looks like Cube MX 4,13 does not allow to disable automatic poly generation from the MX GUI ... see separate post). Or maybe the STM32F030K6 (target device)  does not allow manual poly assignment (which is crazy, IMO)

thanks
11 REPLIES 11
Posted on April 20, 2016 at 19:00

Did any of this help resolve the issues?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stanzanim
Associate III
Posted on April 20, 2016 at 23:45

I am struggling to make the USART Rx working with DMA HAL drivers: thanks much, I'll let you know