I’m adding the swd port on one of my design based on the particle E series. From github I pulled the schematic, the pcb design and the BOM to look at the correct implementation of the SWD port so I can do the same on my board. Everything went fine but I’m unable to spot the value / type of the diode marked as D1 on the VCC pin of the SWD connector. From what I can tell it is a SOD 323 device but I was unable to find any more information on that topic. Did someone know what kind of diode this is ?
Thanks a lot
@TheJoker187, can you share the link to the schematics and pcb design? The diode on Vcc is likely for reverse voltage protection. It could be a 40V/1A Schottky diode like an FM140-N-H or SDB14HS.
The newer boards list a B5817WS diode, which is what I’d expect.
DIODE SCHOTTKY 20V 1A SOD323
It’s not at all critical, so you can substitute any similar diode.
If you’re using the E404X you could even leave the SWD VCC pin disconnected. On the STM32, the SWD power pin is used so a ST-LINK/V2 can detect the voltage of the MCU. CMSIS-DAP debuggers just assume the MCU is 3.3V.
@peekay123 sure, no problem I found everything on the particle git repo at this link @rickkas7 thank you so much ! I’ll check that out
I also would like to ask if there is the possibility to completely disable the swd port enable the readout protection int the firmware and not by using openocd commands after the flash.
For STM32 devices you can just set the RDP level. If you set it to 1 from SWD/JTAG, it disables read-out. You can set the RDP level back to 0 (enable read-out) but doing to erases the flash. You can also set it to 2, which is an e-fuse which is not reversible, which we do not recommend doing.
For nRF52 devices (E404X), APPPROTECT in the UICR works the same as RDP level 1, erasing the entire flash if you reenable read-out.