Electronic – Sharing ARM SWD pins with normal pin function (on Atmel SAM D09 D10 D11)

atmelswd

The Atmel SAM D09 (an ARM Cortex M0+ MCU) can enable normal pin functions on the pins that are normally used for programming (SWD). But in doing so I presume that debugging will become impossible after programming the device.

Is this correct, or may it be possible to share certain functions (like I2C/UART/SPI/digital input) without disturbing debugging?

Second, the D09 datasheet has this curious phrase: "Only the SWCLK pin is mapped to the normal PORT functions. A debugger cold-plugging or hot-plugging detection will automatically switch the SWDIO port to the SWDIO function".

So it seems I can at use at least one pin in a shared mode with SWD. But this phrase is rather ambiguous: which pin would that be, and what functions can be shared on the shareable pin?

What I am asking is specific for the ARM SWD protocol, and the case in point is cheap Atmel SAM D09/D10/D11 chips.

Best Answer

That will depend on the programmer you are using. I am actually working with the SAMD20 using the AVRISP mkll programmer from Atmel and you dont have to care about sharing those pins. The main function of the pin will keep working even if you have the programmer connected there. In fact, that is what ISP means (In system programming) If you are using the Xplain Pro Evaluation Kit, you can program the device using the USB wire and all programming pins will keep working in their main function.