CRC module causing an assert to fail.

Post here first, or if you can't find a relevant section!
Post Reply
Bambo
Posts: 75
Joined: Wed Jan 15, 2020 8:36 pm

CRC module causing an assert to fail.

Post by Bambo »

m trying to get an stm32l452re running but when i try to run my program, it fails at line 165 in stm32l4xx_hal_crc.c:

Code: Select all

  /* makes sure the input data format (bytes, halfwords or words stream)
   * is properly specified by user */
  assert_param(IS_CRC_INPUTDATA_FORMAT(hcrc->InputDataFormat));
When called from line 70 in "hw_config.c":

Code: Select all

  /* Initialize the CRC */
#if defined(HAL_CRC_MODULE_ENABLED)
  HAL_CRC_Init(&hcrc);
#endif
devenv_oFcP1WJmtm.png
devenv_oFcP1WJmtm.png (18.73 KiB) Viewed 501 times
I'

How do i set it up so that hcrc is setup properly? Thanks!
by fpiSTM » Fri Feb 03, 2023 2:08 pm
I guess, You got this issue because you enabled the ASSERT.
As the handle hcrc does not init explicitly this field it is set to 0 which is not a correct value.

I've made a PR:
https://github.com/stm32duino/Arduino_C ... /pull/1941
Go to full post
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: CRC module causing an assert to fail.

Post by fpiSTM »

I guess, You got this issue because you enabled the ASSERT.
As the handle hcrc does not init explicitly this field it is set to 0 which is not a correct value.

I've made a PR:
https://github.com/stm32duino/Arduino_C ... /pull/1941
Bambo
Posts: 75
Joined: Wed Jan 15, 2020 8:36 pm

Re: CRC module causing an assert to fail.

Post by Bambo »

fpiSTM wrote: Fri Feb 03, 2023 2:08 pm I guess, You got this issue because you enabled the ASSERT.
As the handle hcrc does not init explicitly this field it is set to 0 which is not a correct value.

I've made a PR:
https://github.com/stm32duino/Arduino_C ... /pull/1941

This PR fixed the issue
Post Reply

Return to “General discussion”