I’m seeing a systematic upload/programming issue with a new batch of Swan boards (purchsed around April in 2026). I previously had this project working well with another Swan/Notecarrier F set (purchsed back to 2025), but none of the newly purchased Swan boards can be programmed in the same setup.
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
hla_swd
Error: init mode failed (unable to connect to the target)
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked
*** [upload] Error 1
The ST-Link appears correctly in Windows Device Manager. I also briefly saw Error: open failed, but after reconnecting the ST-Link the consistent error is now the target init failure above. An older Swan/Notecarrier setup worked with this same project. After swapping hardware, the upload works with a different Swan (old) setup, but none of the newly purchased Swans work. This makes me think the issue is related to the new Swan batch/revision or a changed programming/boot behavior, rather than my firmware.
Since OpenOCD fails before programming, I assume my firmware code is probably not involved. It seems like the debugger cannot connect to the STM32 target over SWD.
It would be greately appreciated if anyone has the solutions. Thanks.
How are you powering the Swans? When I see unable to connect to the target I tend to first think that it’s not getting enough power (needs to be connected to a LiPo or via USB).
If that’s not the issue, I would try uploading firmware in dfu mode and bypass the ST-Link. We have instructions here.
Lastly, I’d be surprised if this was the issue, but it’s worth consulting this guide re: recovering the STM32L4R5.
Obviously the fact that the “old” Swan is working fine and the “new” ones are not is a huge variable here, but I’d be curious if any of these suggestions resolves the issue (temporarily) before we look into next steps.
Thank you. I haven’t had a chance to review the recovery guide yet. It appears that the guide is intended for an older version of the board.
Since I previously sent you an image of my Swan device, could you help identify which hardware version it is? Also, based on what you’ve seen, what do you think the root cause of the issue might be? I’d like to understand the problem clearly before proceeding with any recovery or repair steps.
Specifically, what information can you tell from the photo? Thanks.
We’re following up with our operations team to see if we can recreate your problem with new hardware.
In the meantime, I spent some time messing with my Swans this afternoon. I did hit one scenario where I needed to do a DFU upload to “fix” an unresponsive Swan, after which I could use the STLINK again.
I know you already mentioned you tried DFU, but just to be very clear, when you tried DFU did you:
Have upload_protocol set to dfu in your platformio.ini? Here’s what mine looks like
Make sure to press the Swan’s buttons in the correct order before uploading? Per the docs: “Press and hold the BOOT button on the Swan, press and release RESET, then release BOOT to cause the Swan to jump into its bootloader.”
If you haven’t used DFU mode the buttons are easy to mess up, so I thought I’d check.