Skip to main content
Agran.1
Associate III
Apr 9, 2021 8:57 AM UTC
Question

Problem with CRC module on touchgfx in stm32h7 ?

Hello, I'm working with the STM32H7B3I-DK.

Info:

1- STM32H7B3I-DK (STM32H7B3LIH6QU)

2-STM32CUBEIDE rev: 1.6.1

3- TouchGfx rev: 4.16.1

I want to use the CRC module for data verification (16 bit).

Problem:

when I use the CRC default version everything works fine

 hcrc.Instance = CRC;

 hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;

 hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;

 hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;

 hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;

 hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;

 if (HAL_CRC_Init(&hcrc) != HAL_OK)

 {

   Error_Handler();

 }

But when I use this version of CRC to calculate my crc on my data, there is a problem with touchgfx (touchgfx_init)

 hcrc.Init.DefaultPolynomialUse   = DEFAULT_POLYNOMIAL_DISABLE;

 hcrc.Init.GeneratingPolynomial   = CRC_POLYNOMIAL_VALUE;

 hcrc.Init.CRCLength              = CRC_POLYLENGTH_16B;

 hcrc.Init.DefaultInitValueUse    = DEFAULT_INIT_VALUE_ENABLE;

 hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;

 hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;

 hcrc.InputDataFormat             = CRC_INPUTDATA_FORMAT_BYTES;

 if (HAL_CRC_Init(&hcrc) != HAL_OK)

 {

   Error_Handler();

 }

Error :

in touchgfx_init function

   FrontendHeap::getInstance()

   touchgfx::Screen::draw()

   "<signal handler called>() at 0xffffffe9"

   HardFault_Handler

I do not understand why.

Is there a problem with touchgfx and CRC module?

Thanks in advanced to all your replies

This topic has been closed for replies.

7 replies

Tesla DeLorean
Guru
Apr 9, 2021 10:07 AM UTC

It is used to authenticate STM32 hardware. You should reset the CRC peripheral at a bus level​ once you are done with it.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Agran.1
Agran.1Author
Associate III
Apr 9, 2021 12:05 PM UTC

thank you for the answer

This authentication is done only at startup ?

This means that I have to reset the CRC peripheral each time I use it.

Tesla DeLorean
Guru
Apr 9, 2021 6:10 PM UTC

I'd hope its a once and done thing at initialization, but this isn't my circus...

You could perhaps test the hypothesis, or turn the clock off occasionally and see if it is used again.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ADal .2
Visitor II
Nov 4, 2021 11:01 AM UTC

Hi,

I have the exact problem: with default CRC poly all is ok, but if I try to change the poly, the execution go in hard fault after MX_TouchGFX_Init().

Is there a solution?

Tesla DeLorean
Guru
Nov 4, 2021 3:44 PM UTC

>>Is there a solution?

Patch the libraries/object...

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ADal .2
Visitor II
Nov 4, 2021 11:42 AM UTC

I think I have resolve the problem: I leave the default poly and, after all initializations, I re-init the CRC peripheral. Now it work

JLojo
Associate III
Mar 8, 2024 10:41 PM UTC

+1

Same for me!

Jyl