2026-02-11 1:23 AM
Hi Community,
I am porting STM32Cube_FW_U5_V1.8.0\Projects\B-U585I-IOT02A\Applications\SBSFU example to be used with USB port for firmware upgrade instead of Uart. I use B-U585I-IOT02A board with U585. Because of some requirements I need to use bare metal USB stack and I successfully ported the classic STM one according to article How to use STMicroelectronics classic USB device middleware with new STM32 families . I have used it SBSFU example and the usb stack works fine when I use it in non secure environment and run Loader binary or Appli_NonSecure as separate application with TZEN=0 without bootloader - I was able successfully send fw image over usb using ymodem. But when I used it in full secure original setup as in the example, I mean TZEN=1, booting with bootloader, using Appli_Secure/Appli_NonSecure - I experienced board restarting when connecting board's USB to the PC - it looks like something goes wrong during USB enumeration process. I have checked that USB IRQ are initially occurring on non secure side, received over USB setup packet is processed, but after that the board restarts for some reasons. It looks like the issue is related to MCU Trust Zone enabled. Do you have any tips what should be additionally configured for USB when Trust Zone is enabled ?
Regards, Janusz
2026-02-18 6:53 AM
Hello @stm32_dev_js ,
In the secure application example, the hardfault generates a reset.
So, as soon as you get a fault in your application you will reset.
First thing is to comment out this reset and investigate the source cause of the fault.
If you are using STM32CubeIDE you can use the Fault Analyser window in order to get information about the cause.
Best regards
Jocelyn