I am working on a project/PCB that contains the STM8S003F3 microcontroller. Every time I do the following steps, the microcontroller gets burned. The steps are:
- I program the STM8S003F3 by using the ST-LINK found in STM8S-DISCOVERY Board (this step i do without any external power supply and it works perfectly);
- I unplug the programmer and connect the board to an external 28V power supply (hardware and firmware here are perfectly working);
- There are some components that need 28V to run, and, for debbuging the firmware, I need the 28V power supply connected to the circuit;
- When my board is connected to this 28V power supply, i plug in the programmer (for programming and debbuging);
- In step 4, the STM8S003F3 stops working. Actually, if I measure the reset pin, it oscilattes at a frequency of about 10kHz.
- From here, I can't program anymore. I have to exchange the microcontroller.
I thinking about some issues that can be the causes of this problem:
- When I was doing this same procedure at my company, there was no problem at all. Now, I am at home and there is no grounding in the power plugs. On the other hand, there is grounding at my company. Is this the problem? Does my USB port have any to do with it?
- There is a switching mode power supply (SMPP) on the project board. Maybe when I plug the programmer into it, the SMPP drives more current and burns the microcontroller? How I said before, none of this problems were going on at my company.