Skip to content

Commit

Permalink
fix(CRC): explicitly set InputDataFormat to avoid assert
Browse files Browse the repository at this point in the history
when assert feature is enabled.
Default value (0) is not correct.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
  • Loading branch information
fpistm committed Feb 6, 2023
1 parent 21dce35 commit 0b4f786
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/SrcWrapper/src/stm32/hw_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ extern "C" {
#if defined(HAL_CRC_MODULE_ENABLED)
CRC_HandleTypeDef hcrc = {.Instance =
#if defined(CRC2_BASE)
CRC2
CRC2,
#elif defined(CRC_BASE)
CRC
CRC,
#else
#error "No CRC instance available!"
#endif
#if defined(CRC_INPUTDATA_FORMAT_BYTES)
.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES
#endif
};
#endif
Expand Down

0 comments on commit 0b4f786

Please sign in to comment.