cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement the hardware CRC on the STM32H745I-DISCO

Icecube
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Icecube
Associate II

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.

View solution in original post

3 REPLIES 3

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Piranha
Chief II

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
Associate II

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.