cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-U575ZI-Q download fails intermittently with OpenOCD

Rob Meades
Senior

I find that, every so often, flash download to my Nucleo-U575ZI-Q board from OpenOCD (driven by Zephyr west) fails.  The error reported is usually Error: [STM32U575ZITxQ.cpu] Could not find MEM-AP to control the core, though sometimes it doesn't seem to even get that far.  This happens on more than one board and from more than one PC.  The FW image I am loading is not a secure one. What might I do to stabilise the situation?

Here is a fail case:

Info : STLINK V3J12M3 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.289600
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : clock speed 200 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0be12477
Error: [STM32U575ZITxQ.cpu] Could not find MEM-AP to control the core
Warn : target STM32U575ZITxQ.cpu examination failed
Info : starting gdb server for STM32U575ZITxQ.cpu on 3333
Info : Listening on port 3333 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* STM32U575ZITxQ.cpu cortex_m little STM32U575ZITxQ.cpu unknown
Info : Unable to match requested speed 480 kHz, using 200 kHz
Info : Unable to match requested speed 480 kHz, using 200 kHz
Error: [STM32U575ZITxQ.cpu] Could not find MEM-AP to control the core
Error: [STM32U575ZITxQ.cpu] Could not find MEM-AP to control the core
Error: [STM32U575ZITxQ.cpu] Debug AP not available, will not halt after reset!
Error: [STM32U575ZITxQ.cpu] Could not find MEM-AP to control the core
TARGET: STM32U575ZITxQ.cpu - Not examined

...or sometimes I just get this:

Info : STLINK V3J12M3 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.284042
Error: init mode failed (unable to connect to the target)

...while here is a success case:


Info : STLINK V3J12M3 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.282447
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : Unable to match requested speed 500 kHz, using 200 kHz
Info : clock speed 200 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0be12477
Info : [STM32U575ZITxQ.cpu] Cortex-M33 r0p4 processor detected
Info : [STM32U575ZITxQ.cpu] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for STM32U575ZITxQ.cpu on 3333
Info : Listening on port 3333 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* STM32U575ZITxQ.cpu cortex_m little STM32U575ZITxQ.cpu unknown
Info : Unable to match requested speed 480 kHz, using 200 kHz
Info : Unable to match requested speed 480 kHz, using 200 kHz
CPU in Non-Secure state
[STM32U575ZITxQ.cpu] halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0x0804d78c msp: 0x2002c2c0
Info : Unable to match requested speed 4000 kHz, using 3300 kHz
Info : Unable to match requested speed 4000 kHz, using 3300 kHz
Info : device idcode = 0x20016482 (STM32U57/U58xx - Rev X : 0x2001)
Info : TZEN = 0 : TrustZone disabled by option bytes
Info : RDP level 0 (0xAA)
Info : flash size = 2048 KiB
Info : flash mode : dual-bank
Info : Padding image section 0 at 0x080ab4ac with 4 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x080ab4b0 .. 0x080abfff
auto erase enabled
wrote 701616 bytes from file /home/ubxlib/workspace/ubxlib_PR-1149/_jenkins_work/32/build/zephyr/zephyr.hex in 5.656373s (121.133 KiB/s)
Info : Unable to match requested speed 480 kHz, using 200 kHz
Info : Unable to match requested speed 480 kHz, using 200 kHz
shutdown command invoked

 

1 REPLY 1
Jacob WOODRUFF
ST Employee

Hi All,

 

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.

 

Regards,
Jake

ST Support