Menu

#171 BUG: CRC calculation doesn't work over UART

none
New
nobody
bug (2)
Medium
Defect
2025-03-11
2025-03-11
Alex
No

The STM32 bootloader needs different arguments to calculate the checksum when using the UART interface vs I2C interface.

When I try to do a CRC calclulation over UART it fails. Looking at the code, I believe this is because stm32_crc_memory() gets called regardless of the interface being used, and when talking over UART, stm32_crc_memory() doesn't supply the CRC polynomial or initial value. According to AN3155 section 3.13, when the bootloader does CRC calcuation over UART you need to send the command (0xA1), start address, length to check, CRC polynomial, and initial value.

When the bootloader does CRC calcuation over I2C you only need to send the command (0xA1), start address, and length to check (per AN4221 section 2.20). So it looks like the stm32flash code is set up to do CRC calculation over the i2c interface.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB