STM8S103 Code Upload / Execution Issue

Issue with STM8S103 Code Uploading on Identical PCB Boards

I have two identical PCB boards, both equipped with the STM8S103 microcontroller. One board functions perfectly, with code uploading and running as expected, while the other does not.

Observations

  1. Voltage Measurements
  • On the non-working board:
    • NRST pin: 1.6V
    • SWIM pin: 3.2V
  • On the working board:
    • NRST pin: 3.2V
    • SWIM pin: Floating around 200mV
  1. Microcontroller Replacement
  • Suspecting a defective STM8S103 on the non-working board, I desoldered it and placed it on a functioning development board (See the attachement).
  • To my surprise, the board started working perfectly—code uploaded and executed without issues.
  • I measured the voltage on the NRST and the SWIM pins. which were same as in the working board mentioned above.
  • This indicates that the microcontroller on the non-working board is not faulty.

Setup

  • Development Tools:
    • SDUINO
    • Arduino IDE
    • ST LINK V2

I would greatly appreciate any insights or suggestions to identify the root cause of this issue

Thank you!

I moved your topic to an appropriate forum category @suwinminura.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

So the non-working board has a PCB error or had a bad soldering.

i have two board that is not working and one working perfectly.
i checked each and every pcb trace that is coming to STM8S103 and all of them over 1Mega Ohm to the ground and all of them are intact.
is there boot up sequence to the STM8S103

is there perticula reason the STM8S103's NRST pin goes to 1.6V and the SWIM pin to 3.2V???

You may want to check the value of the capacitor at your VCAP pin.

Without that it's internal 1.8V regulator may fail to work.

i have give a SMD 0603 1uF capacitor for that. that also checks out

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.