2021-08-09 08:08 AM
Hi everybody,
First, I'm sorry for my poor English.
I'm using STM32F407VET6 and I want to calculate 16bit CRC of Modbus RTU. Can anybody help me how I can use hardware CRC of the STM32F407? Is it possible to use hardware crc for modbus rtu? Or should I use software calculation?
Thanks
2021-08-09 08:16 AM
> Is it possible to use hardware crc for modbus rtu?
No, the hardware CRC in 'F407 has a fixed 32-bit data width and a fixed polynome. In newer STM32 there is a more flexible CRC unit, but not in the 'F4.
JW
2021-08-09 08:27 AM
Needs to be software on the F4, here are some examples of software/hardware implementations I built for the F3 years back.
The software methods can be compact and fast.
https://community.st.com/s/contentdocument/0690X0000060JWXQA2
2021-08-09 10:45 PM
Thanks so much
2021-08-09 11:03 PM
Thank you, I investigated your code and I have a few questions:
what is the difference between for example CRC_MODBUS16SlowBlock() and CRC_CRC16SlowBlock?
and the difference between CRC_MODBUS16SlowBlock() and CRC_MODBUS16QuickBlock() for example? Are they have different results? and if the results are different, which one should i use?
Thanks again Tesla DeLorean.