Skip to main content
Explorer
November 18, 2024
Question

STM8S001J3 Locked After Configuring SWIM Pin as GPIO

  • November 18, 2024
  • 1 reply
  • 588 views

Hello STM Community,

I am working with the STM8S001J3 microcontroller and facing an issue with configuring the SWIM pin (PD1) as a GPIO for LED control. 

Here is the problem:

  1. When I configure the SWIM pin as a GPIO, the MCU gets locked, and I am unable to download any code into the microcontroller afterward.
  2. To mitigate this, I tried adding a delay before configuring the SWIM pin as GPIO, but the issue persists — the MCU still gets locked.

Is there a proper way to configure the SWIM pin as GPIO and still retain the ability to program the MCU afterward?

If before the I/O configure disable SWIM mode then I configure SWIM pin as I/O (GPIO) pin and after power reset swim mode enable or disable ?

Thank you in advance.

    This topic has been closed for replies.

    1 reply

    Visitor II
    November 25, 2024