cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with CRC module on touchgfx in stm32h7 ?

Agran.1
Associate II

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

7 REPLIES 7

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

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.

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
Up vote any posts that you find helpful, it shows what's working..
ADal .2
Associate

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?

ADal .2
Associate

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

>>Is there a solution?

Patch the libraries/object...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

+1

Same for me!

Jyl