Your SAMD10 Xplained Mini board can be used as a standalone SWD programmer/debugger.

     Recently I dived down the rabbit hole of SWD programmers because I chose a SAMD10 MCU for my project, which is programmed through SWD. But guess what, SWD is not SWD but it also kind of is? If you program STM32 devices you will no doubt know what SWD is and that your ST-link can be reprogrammed to be a J-link. And J-link is supposed to be a general purpose SWD programmer that works for everything right? No. When I reflashed my genuine ST-link to J-link it would talk to Atmel studio, everything seemed like it would work but nothing did. Turns out this SWD interface is only an SWD interface when a ST microcontroller is connected but as soon as it touches Atmel stuff it goes "Not supported" and refuses to talk. Like why? Is this Cortex M0 device not a Cortex M0 device, is this SWD not SWD? We'll never know.

    So I start looking for alternatives and one forum member pointed me to a dev board named the SAMD10 Xplained Mini, which just so happens to have the exact same micro as mine. What's more it was even cheaper than a J-link, what a score. So I order it and as soon as I receive it I start programming it. And today I finally desoldered the on board SAMD10 MCU and succesfully programmed my external SAMD10 MCU that I had soldered on a homemade breakout board.


    Now you might ask me why did I desolder the MCU? There's an SWD connector marked on the board can't I just use that? The answer is no, this connector is meant to plug into an external programmer and cannot be used as an output for the internal programmer of the board. if you didn't want to desolder the MCU you could cut the SWD traces going to it but that would get finicky as you only have a milimeter or so to work with. Also resoldering the cut trace would be pretty hard since they're so tiny. According to the schematic the MCU has it's own switched power rail, so maybe if you disable that the MCU won't get any power and will not interfere with the SWD interface. But if there's a protection diode on the SWD pins then chances are that would be enough to power the MCU and cause it to interfere with the SWD interface. 

    I have a hot air station, which I used to lift the MCU off the board, this way I can just plop ot back on if I need to. Beware that if you have a cheap hot air station it might struggle removing the MCU, because mine sure did.

Anyways, that's it for now and thanks for visiting my blog.

Komentarai

Populiarūs šio tinklaraščio įrašai

Crap Diodes! The truth about the 150EBU04 eBay special.

Infrared RGB LED controller using Digispark (Attiny85).

Modding a laptop power brick into a lithium pack charger and some Manhattan style prototyping.