Skip to content

Commit 0b4f786

Browse files
committed
fix(CRC): explicitly set InputDataFormat to avoid assert
when assert feature is enabled. Default value (0) is not correct. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 21dce35 commit 0b4f786

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libraries/SrcWrapper/src/stm32/hw_config.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ extern "C" {
2222
#if defined(HAL_CRC_MODULE_ENABLED)
2323
CRC_HandleTypeDef hcrc = {.Instance =
2424
#if defined(CRC2_BASE)
25-
CRC2
25+
CRC2,
2626
#elif defined(CRC_BASE)
27-
CRC
27+
CRC,
2828
#else
2929
#error "No CRC instance available!"
30+
#endif
31+
#if defined(CRC_INPUTDATA_FORMAT_BYTES)
32+
.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES
3033
#endif
3134
};
3235
#endif

0 commit comments

Comments
 (0)