cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S103 Code Upload / Execution Issue

SuwinManudewa
Visitor

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
  2. 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!

1 REPLY 1
Peter BENSCH
ST Employee

Welcome @SuwinManudewa, to the community!

As you have already described, there was either a problem with the board where you soldered down the apparently faulty STM8S, or the programming went wrong beforehand. I suspect the former, as I've seen quite a few boards with invisible shorts and other issues.

In this context: is your ST-LINK/V2 one of those fakes in a colourful tin can?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.