cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L SWIM pin set up?

johnjohn9107
Associate II
Posted on August 20, 2013 at 13:43

How should PA0 be set up for the SWIM interface? Input? Output? Shake it all aboutput?

Pretty fundamental Q I'd have thought, but I can't find any info'.

plenty of fatuous 'Overviews' about SWIM but little useful info.

Del (sorry I've defaulted back to grumpy mode having taken 2 steps forward and one back today 😉 )
1 REPLY 1
fggnrc2
Associate II
Posted on August 21, 2013 at 15:19

Hello Derek.

The SWIM pin is configured during the reset phase.

Therefore, there is no need to configure it.

Leave its configuration untouched and your application will work.

You only need to configure PA0 if you use one of its alternate function.

For instance, a STM8L15x outputs the BEEP signal to PA0, but you have first to disable SWIM (clear bit 0 in CFG_GCR), enable and configure the BEEP module, and finally configure PA0 as output push/pull.

BR

EtaPhi