Skip to main content
Associate
August 18, 2023
Solved

How to access STM32H753 CRC unit

Hello,

Recently I try to use the CRC unit insde stm32h753vih6 to do the crc calculation. According to the spec(RM0433), I tried to read/write the registers defined in chapter21. But all the five CRC related registers(CRC_DR, CRC_IDR, CRC_CR, CRC_INIT, CRC_POL) are zero and cannot be changed.

addr:0x58024c00 value:0x0
addr:0x58024c04 value:0x0
addr:0x58024c08 value:0x0
addr:0x58024c0c value:0x0
addr:0x58024c10 value:0x0  //CRC_POL should have 0x04c11db7 as the default value

I have tried to reset CRC unit through CRC_CR bit0. But the issue still exists.

Does CRC module need extra configuration so that it can be used?

This topic has been closed for replies.
HigerYBest answer
Associate
August 18, 2023

I think that I just find out the rootcause. I didn't call __HAL_RCC_CRC_CLK_ENABLE() to enable the CRC clock. After doing that, I can access the CRC related registers.

2 replies

HigerYAuthor
Associate
August 18, 2023

In the beginning, I followed the following example to do the crc calculation but always got the zero crc value. Then I tried to access its registers and then got the issue described in my post.

https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Projects/STM32H743I-EVAL/Examples/CRC/CRC_Example/Src/main.c

HigerYAuthorBest answer
Associate
August 18, 2023

I think that I just find out the rootcause. I didn't call __HAL_RCC_CRC_CLK_ENABLE() to enable the CRC clock. After doing that, I can access the CRC related registers.