cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer 2.9.0 + USART + STM32WLE5, appears to truncate binary on a 4k boundary

Dana Myers
Senior

I am programming an STM32WLE5CCU6 using STM32CubeProgrammer v2.9.0 and USART / embedded bootloader. Without exception, every binary I attempt to program (ELF or bin does not matter) is truncated at a 4k boundary (0x1E000 in one case, 0x14000 in another). The last portion of the binary is not programmed to the MCU.

Using the ST-Link v2 on the same part, programming is successful. Binaries are produced with STM32CubeIDE v1.8.0 using the built-in ARM GCC toolset.

This very much looks like a bug in STM32CubeProgrammer v2.9.0

1 REPLY 1
Dana Myers
Senior

Additional investigation found that erasing the last sector being programmed (or possibly that sector and ones before and after), then re-programming, successfully verified.

For example, binary is 0x14418 bytes long, the first attempt to program has a verify error at 0x14000. Using CubeProgrammer, I erased sectors 0x13800, 0x14000, 0x14800 and then programming succeeded. I wonder if I am tripping over an instance of erratum 2.2.2 "Overwriting with all zeros a Flash memory location previously programmed with all ones fails".

There's definitely a bug here, and I think it might be in the STM32WL.