2026-01-15 2:04 PM
I've got an STM32U385 on a custom board that is unresponsive.The software is based on the OEMiROT trustzone example.
The sequence of events that lead to this, as nearly as I can remember were:
1.) Set up the device with provision.bat, with RDP level 2. This worked fine. The device ran as it should.
2.) Regress the device using regression.bat, this process failed, but left the device in an accessible state for the debugger.
3.) I connected the boot0 pin to VDD, connected with the programmer in hot plug mode, set RDP to 1.
4.) I set RDP to 0 and TZ enabled to 0, which worked.
5.) I disconnected the boot0 jumper, and tried loading code normally, it then failed at address 0x80004000. Reading out that address with the programmer revealed that it was not programmed, but instead remained all 0xff's. I tried several times to program, always with the same result, the first part of memory, up to address 0x80003fff programmed correctly, and the rest failed.
6.) I tried running the regression script again, and it gave me these errors:
Error: Uploading Option Bytes bank:0 failed
Error: Initializing the Option Bytes failed
From this point forward, when I try to connect using STM32CubeProgrammer, either with boot0 tied to vdd or not, I get a pop up window with the error "Error: Initializing the Option Bytes failed", and then it disconnects.
I'm connecting with mode "Hot Plug" and cannot get this to work.
Any ideas what might have gone wrong, and what I might be able to do to unwedge this device.
I've run this process successfully a number of times (although usually with RDP level 0) and not had a problem.