cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to flash OEMiRoT application using STLink-V2

giubacchio
Associate III

Hi,

I'm developing a secure boot application for STM32H563ZI microcontroller. I started with a very simple application following ST template code and tutorials like this one: https://wiki.st.com/stm32mcu/wiki/Security:How_to_start_with_STM32CubeMX_OEMiRoT_Boot_path_on_STM32H563  


Everything runs as expected when I try to run my application using the NUCLEO-H5 board. However, this is not true when I do the same provisioning process in my H5 custom board. The only difference I can see between the two tests is that in the custom board I'm using the STLink-V2 programmer, while the Nucleo is programmed by the embedded STLINK-V3EC.

Here are some additional points:

1) in both cases the provisioning script reaches the end, saying "The board is correctly configured".

2) in the custom board, I see the flash full of zeros after provisioning; I checked it with stm32CubeProgrammer

3) I have no problems in flashing firmware through stm32CubeProgrammer or stm32CubeIde in my custom board


Am I missing something? I tried to modify stm32programmercli settings used by the provisioning script without success. 
Thank you,
Giulio

12 REPLIES 12
giubacchio
Associate III

Hello @Jocelyn RICARD,

I think both micros can be classified as STM32H563ZI. 
The markings of the H5 in the Nucleo says:
STM32H563ZIT6U - AA065VQ - TMN AA 430

The markings of the H5 in the custom board says:

STM32H563ZIT6 - AA102VQ - TMN AA 434

 

The STMCubeProgrammer version is the v2.21.0. I'm running everything under Linux Ubuntu 22.04.

Thank you,
Giulio

Jocelyn RICARD
ST Employee

Hello @giubacchio ,

It looks like you have a chip having flash issues, this is not common.

You can possibly make more tests to confirm the chip is not fully functional.

Maybe, switch back TZ to 0xC3 and fill the flash with anything using verification.

Check on another board...

Best regards

Jocelyn

giubacchio
Associate III

Hello @Jocelyn RICARD,

I arranged to get another custom board: in this one I have no problems even when using the OEMiROT bootloader.

I'm not sure that the issue is in the flash, since the same application without OEMiROT works smooth in the suspected faulty H5 chip. I’m a bit disappointed, but I’ll get over it.

Thank you for your time,
Giulio