Skip to main content
Agran.1
Associate III
April 9, 2021
Question

Problem with CRC module on touchgfx in stm32h7 ?

  • April 9, 2021
  • 4 replies
  • 2340 views

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.

4 replies

Tesla DeLorean
Guru
April 9, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Agran.1
Agran.1Author
Associate III
April 9, 2021

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
April 9, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
ADal .2
Visitor II
November 4, 2021

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
November 4, 2021

>>Is there a solution?

Patch the libraries/object...

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
ADal .2
Visitor II
November 4, 2021

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
March 8, 2024

+1

Same for me!

Jyl