Skip to main content
Explorer II
July 11, 2024
Solved

STM8S001J3: Unable to communicate with the device

  • July 11, 2024
  • 1 reply
  • 2056 views

I am trying to program the STM8S001J3 microcontroller, on a custom board. I am using ST Visual Programmer tool for flashing the program but I’m running into the following error continuously.

samruddhi_daithankar_0-1720694091131.png
I have tried using both ST-Link/V2(A) and ST-Link/V2(A) ISOL but it gives the same error. Since Reset pin is not available in this controller, connections I made are as follows:

ST-Link/V2(A)

Target MCU

VDD

Pin 4

GND

Pin 2

Data

Pin 8


And I believe the configurations I made in STVP are correct:

samruddhi_daithankar_1-1720694091159.png


So, I have these questions:
1. Are the connections with ST-Link correct? Should we be using another version of debugger/programmer? If yes, could you direct us to which device we should be using?
2. Is there any other way to simulate the reset condition other than Power-On Reset?


    This topic has been closed for replies.
    Best answer by Techn

    **you can reprogram the device.. not able to debug.  For debugging, disable usage of SWIM pin , then debug the application and enable it later.

    1 reply

    Visitor II
    July 11, 2024

    As this MCU doesn't have reset pin, external reset is only possible by Power-On Reset.

    If SWIM pin is not used as GPIO, it should be possible to connect by SWIM even without reset. Read RM0016 pages 57 and 58, and datasheet page 12.

    Explorer II
    July 12, 2024

    In my design, SWIM pin is also being used as PWM output. in that case, will I not be able to debug it at all? 
    Section 4.2 of the Datasheet mentions:
    As the NRST pin is not available on this device, if the SWIM pin should be used with the I/O pin functionality, it is recommended to add a ~5 seconds delay in the firmware before changing the functionality on the pin with SWIM functions. This action allows the user to set the device into SWIM mode after the device power on and to be able to reprogram the device. 

    TechnAnswer
    Graduate II
    July 13, 2024

    **you can reprogram the device.. not able to debug.  For debugging, disable usage of SWIM pin , then debug the application and enable it later.