cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way in software to detect if rt-link (swim) is attached?

mchahn
Senior

I would like to use swim pin on my stm8s000f3 to drive an led. I've set up the circuit so the swim pin goes to the gate of a fet that drives the led. This makes sure the led circuit doesn't affect the swim pin during debugging.

I would like to enable the swim pin as an output to drive the led when I'm not debugging. It would be nice if my software could automatically know when it is safe to make the swim pin an output, i.e. when the rt-link isn't connected. I would prefer this to changing the code when not debugging which would be a pita.

I thought of maybe trying to drive the pin low and high and checking to see if the level changes. But I don't know if the rt-link always drives the pin while connected.

Any ideas in general about making it easy to know when swim can be an output?

0 REPLIES 0