Skip to main content
Visitor II
November 8, 2014
Question

STM8 SWIM pin as output/Debug

  • November 8, 2014
  • 2 replies
  • 855 views
Posted on November 08, 2014 at 11:36

1. I have STM8S003F3 & want to use its debug pin as output. 

So I will configure it my code.

2. Will that make debug option dead?

On next power up, will I be able to debug the code?? Because pin will already be configured as output by that time

    This topic has been closed for replies.

    2 replies

    Visitor II
    November 8, 2014
    Posted on November 08, 2014 at 15:36

    Yes, you can use SWIM pin as output, it won't brick the device.

    Visitor II
    November 10, 2014
    Posted on November 10, 2014 at 12:08

    Hi

    I am answer this from memory, and bear in mind that I work with the STM32 but I have written the driver for the STM32 to program a STM8 with SWIM

    ''

    2. Will that make debug option dead?

    On next power up, will I be able to debug the code?? Because pin will already be configured as output by that time

    ''

    Yes and No.

    If the debug is done with SWIM - it will toggle the reset line on SWIM entry.

    If the line is in use for SWIM - it CANNOT be used for output (ie it is held by the SWIM interface).

    The simple answer is : if you debug - you cannot use the Pin for output.

    If you do not debug - the pin will be configures for output