cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U575 Bootloader: Get CRC command returns 0x0000 despite ACKs (Works on G0/G4)

rcabrera
Associate II

Hello,

I am encountering a specific issue with the system bootloader (I2C interface) regarding the Get CRC command.

When sending the Get CRC command sequence via the system bootloader, the STM32U575 ACKs all bytes (Command, Address+XOR, Length+XOR), but the returned CRC value is consistently 0x0000 regardless of the binary file loaded in it. When running HAL_Calculate_CRC() within the user application on the same STM32U575 units, we receive valid, non-zero CRC data.

I have tested and confirmed this issue across 2x STM32U575 units using both the stm32flash open source tool and manual scripting via an Aardvark I2C host. To isolate the issue, we tested the exact same scripts and stm32flash commands on STM32G0 and STM32G4 targets and they worked perfectly, returning valid non-zero CRCs when both in application and bootloader mode.

Any insight into why the U5 is returning zeros while its predecessors work fine would be greatly appreciated.

stm32flash output in the G0:

./stm32flash -C -a 0x5d /dev/i2c-4                            
stm32flash 0.7

http://stm32flash.sourceforge.net/

Interface i2c: addr 0x5d
Version      : 0x12
Device ID    : 0x0467 (STM32G0B0/B1/C1xx)
- RAM        : Up to 128KiB  (16384b reserved by bootloader)
- Flash      : Up to 512KiB (size first sector: 1x2048)
- Option bytes  : 128b
- System memory : 28KiB
CRC computation
CRC(0x08000000-0x08080000) = 0xdb196de1

stm32flash output in the U575:

./stm32flash -C -a 0x5A /dev/i2c-4                                     <
stm32flash 0.7

http://stm32flash.sourceforge.net/

Interface i2c: addr 0x5a
Version      : 0x12
Device ID    : 0x0482 (STM32U575xx/585xx)
- RAM        : Up to 768KiB  (16384b reserved by bootloader)
- Flash      : Up to 2048KiB (size first sector: 1x8192)
- Option bytes  : 1b
- System memory : 64KiB
CRC computation
CRC(0x08000000-0x08200000) = 0x00000000

kona:/ # 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

On STM32U575, the CRC calculation via the system bootloader is not supported.

This is why although the command bytes are acked( command, address, Length), the returened CRC value is always 0x0.

View solution in original post

3 REPLIES 3
rcabrera
Associate II

Hello,

I am encountering a specific issue with the system bootloader (I2C interface) regarding the Get CRC command.

When sending the Get CRC command sequence via the system bootloader, the STM32U575 ACKs all bytes (Command, Address+XOR, Length+XOR), but the returned CRC value is consistently 0x0000 regardless of the binary file loaded in it. When running HAL_Calculate_CRC() within the user application on the same STM32U575 units, we receive valid, non-zero CRC data.

I have tested and confirmed this issue across 2x STM32U575 units using both the stm32flash open source tool and manual scripting via an Aardvark I2C host. To isolate the issue, we tested the exact same scripts and stm32flash commands on STM32G0 and STM32G4 targets and they worked perfectly, returning valid non-zero CRCs when both in application and bootloader mode.

Any insight into why the U5 is returning zeros while its predecessors work fine would be greatly appreciated.

stm32flash output in the G0:

./stm32flash -C -a 0x5d /dev/i2c-4                            
stm32flash 0.7

http://stm32flash.sourceforge.net/

Interface i2c: addr 0x5d
Version      : 0x12
Device ID    : 0x0467 (STM32G0B0/B1/C1xx)
- RAM        : Up to 128KiB  (16384b reserved by bootloader)
- Flash      : Up to 512KiB (size first sector: 1x2048)
- Option bytes  : 128b
- System memory : 28KiB
CRC computation
CRC(0x08000000-0x08080000) = 0xdb196de1

stm32flash output in the U575:

./stm32flash -C -a 0x5A /dev/i2c-4                                     <
stm32flash 0.7

http://stm32flash.sourceforge.net/

Interface i2c: addr 0x5a
Version      : 0x12
Device ID    : 0x0482 (STM32U575xx/585xx)
- RAM        : Up to 768KiB  (16384b reserved by bootloader)
- Flash      : Up to 2048KiB (size first sector: 1x8192)
- Option bytes  : 1b
- System memory : 64KiB
CRC computation
CRC(0x08000000-0x08200000) = 0x00000000

kona:/ # 

 

Hello,

 

On STM32U575, the CRC calculation via the system bootloader is not supported.

This is why although the command bytes are acked( command, address, Length), the returened CRC value is always 0x0.

rcabrera
Associate II

Request to adding this to the next revision of the STM32U575XXXX errata sheet  as both AN4221 and the GET command both return CRC checksum as a feature supported by the platform.