Skip to main content
Icecube
Associate II
September 19, 2022
Solved

How to implement the hardware CRC on the STM32H745I-DISCO

  • September 19, 2022
  • 3 replies
  • 1755 views

I have worked with the HAL software implementation of the CRC using HAL_CRC_Calculate() and HAL_CRC_Accumulate(). Works great. How do I utilize the hardware CRC feature? Can you direct me to an example or more information?

This topic has been closed for replies.
Best answer by Icecube

As it turns out there are 2 CRC Hardware methods on the TM32H745I. The  HAL_CRC_Calculate() / HAL_CRC_Accumulate() method may be used to calculate the CRC anywhere in the memory map. A processor running at 120Mhz took about 31.5mS to CRC 1M bank of flash. Whereas using the alternate method using HAL_FLASHEx_ComputeCRC() took 2.7mS to cover the same bank at the same speed.

3 replies

Tesla DeLorean
Guru
September 19, 2022

https://community.st.com/s/question/0D53W00001nmNa5SAE/using-the-stm32h745idisco-and-i-want-to-monitor-bank-1-crc-using-the-m4-processor-is-there-a-good-reference-or-example-i-can-use-as-a-starting-point?t=1663603957508

Perhaps look at the library source, and the reference manual?

The primary peripheral expect to be configured, and then data pumped through the data register.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Piranha
Principal III
September 19, 2022

So, you have a time to ask how to use the hardware CRC for 4 days, but you don't have a time to look at a reference manual and at the HAL_CRC_Calculate() code, which consists of just 20 lines of code. It would take less time to realize that that HAL_CRC_Calculate() function already uses the hardware CRC, than it took to write all of these forum posts.

Icecube
IcecubeAuthorBest answer
Associate II
September 21, 2022

As it turns out there are 2 CRC Hardware methods on the TM32H745I. The  HAL_CRC_Calculate() / HAL_CRC_Accumulate() method may be used to calculate the CRC anywhere in the memory map. A processor running at 120Mhz took about 31.5mS to CRC 1M bank of flash. Whereas using the alternate method using HAL_FLASHEx_ComputeCRC() took 2.7mS to cover the same bank at the same speed.