Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWIM error 0x16 when attempting to flash STM8L050J3 #152

Open
ucukertz opened this issue Sep 5, 2022 · 5 comments
Open

SWIM error 0x16 when attempting to flash STM8L050J3 #152

ucukertz opened this issue Sep 5, 2022 · 5 comments

Comments

@ucukertz
Copy link

ucukertz commented Sep 5, 2022

Using stm8flash to upload binary to STM8L050J3 with STlink v2 returns the following log:

stm8flash -c stlinkv2 -p stm8l050j3 -w build/main.ihx
Determine FLASH area
STLink: v2, JTAG: v29, SWIM: v7, VID: 8304, PID: 4837
SWIM error 0x16

I've tried to search for the meaning of the error but I can't seem to find it.
What does the error mean and what can I do to fix it? Thank you!

@stefaandesmet2003
Copy link
Contributor

Have you been able to figure this out?
You could try enabling debug prints (make stm8flash with DEBUG=1), you'll get more details of the swim commands, and maybe hints as how to solve your problem.
@spth any documentation for these swim errors?

@d3xt3r01
Copy link

+1 for the swim errors. I get the same with a stm8l001j3 which I think it's read protected but I'm not sure.

@chaankya
Copy link

chaankya commented Feb 4, 2023

+1 for error 0x16. I am trying to flash stm8s003f3p6. The flash procedure worked earlier but stopped working. Is it due issue with the stlink V2 clones? The stlink V2 is able to flash a stm32 blue pill.

@spth
Copy link
Collaborator

spth commented Nov 27, 2023

I have no idea about the SWIM errors. Maybe @vdudouyt can help?

@consp
Copy link

consp commented Jan 24, 2024

In my case the GND/SWIM pins were reversed vs what was on the device, resulting in error 0x16 when effectively using it with DATA (aka SWIM) attatched to GND. Reversing GND/SWIM pins resulted in proper programming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants