Page 1 of 1

ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32

Posted: Tue Jul 23, 2024 3:10 pm
by Ruturaj Mali
Hello,

I'm using a ST Link V2 to program my STM8S microcontroller board, but I'm having problems with the programmer. I am attempting to flash a.hex file into an STM8 using STVP and the ST Link V2, but I am unable to connect to the device. Even after disabling read protection in STVP, the device is still unable to communicate. I tried upgrading the firmware, but the problem persists.

Here is the error i am receiving:

Re: ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32

Posted: Tue Aug 27, 2024 10:56 am
by Shraddha
The error message you are encountering in the ST Visual Programmer (STVP) indicates that the ST Link V2 is unable to communicate with the STM8S microcontroller.

Check with the following steps,
1. Ensure that the SWIM cable is properly connected between the ST Link V2 and the STM8S microcontroller.
2. Verify that the correct pins are connected: SWIM (pin 7 on STM8), GND, and NRST (optional but recommended for resetting the microcontroller).
3. If you are using an adapter board, check the integrity of the connections on the adapter.
4. If the application code uses the SWIM Disable and Reset pin as Output, you may need to hold the NRST pin low (reset) while attempting to connect.
5. Ensure that the SWIM clock divider is not disabling the clock frequency for communication
6. Ensure that the ST Link V2 firmware is up to date. Even though you mentioned attempting an update, double-check on ST's official site for any newer updates.
7. Ensure that the ST Link V2 is correctly recognized by STVP (check under "Configure -> Hardware").

If none of the above steps work, consider testing with another ST Link V2 programmer, as the current one may be faulty.