2020-01-27 04:17 PM
I was using STM8SVLDISCOVERY in a small project because it was the evaluation board that I had, but in a more final stage I would like to use an stm8sl001j3 as uC.
For that, I got a STM8-SO8-DISCO to be able to use the same uC that I want in the final product. After "converting" my project to use stm8l instead of stm8s, I tried to deploy it in the new board but something looked strange.
After looking at the documentation I realized I should have put a 5s delay in the beginning of the code as I was using SWIM pin as an IO too, otherwise I would brick the CPU.
As I am getting SWIM errors in the IDE, I suppose I already bricked the CPU, and after some research I couldn't find if there is a way to undo this situation.
That's why I'm here, is there any way to do that or I lost the uC?
2020-01-29 10:13 AM
Same happened to me using a different board (http://www.colecovision.eu/stm8/STM8S001J3%20Reference%20Serial.shtml) when I first targeted the STM8S001.
I'd recommend to keep a few spare chips around, just in case. At least it doesn't take much time to desolder and replace an 8-pin device on a dev board.
2020-01-29 05:48 PM
Thanks for sharing!
I just changed the uC and by putting this delay I'm not bricking the CPU anymore (at least I can deploy the code now).
I'm still having some errors. Even now that I'm waiting for 5 seconds, when I try to change pin 1 (PC3/SWIM) to use as an output for PC3 I start to get SWIM errors (30004 timeout). I followed this exact logical sequence (https://www.st.com/content/ccc/resource/technical/document/application_note/group0/f0/a0/b1/90/65/14/42/ca/DM00422107/files/DM00422107.pdf/jcr:content/translations/en.DM00422107.pdf) which I use the delay, then configure GPIOs and just after that configure clock settings and so on, but still getting errors. By debbuging I can see that the problem happens when I try to configure PC3 (same pin as SWIM) as an output.
Any toughts?