This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SWD JTag to a Sparkfun nRF52832

Hi

I have gotten a Nordic PCA10040 hooked up to a Sparkfun nRF52832 as described near the bottom of the page here: learn.sparkfun.com/.../nrf52832-breakout-board-hookup-guide (Resources and Going Further).

I have also got a working build environment and debugging working using Eclipse and the GNU Arm Eclipse Plugin via this tutorial (which BTW was incredible helpful). I am able to build, deploy and debug.

What I would like to do is be able to build, deploy and debug on the Sparkfun breakout board listed above. Are there any tutorials regarding this ?

Thanks

J

  • @bootchk Not sure I do follow your remarks. Sparkfun "probe" is simple UART (TTL Serial) convertor and probably works with pre-loaded FW and bootlaoder. If you want to really reprogram the nRF52 on the board (which I believe you do;) you need some JTAG/SWD programmer like nRF52 DK or other J-Link. To the "fight": we cleared that they don't fight for "logical" interface (Sparkfun using UART on some GPIO PINs while nRF52 DK using SWD PINs) and if you connect it correctly (= only VTG on P20 header of nRF52 DK) then they fight on power lines neither. When you use nRF52 DK according to this picture then Sparkfun "probe" only provides 3V3 power. Sure you can eliminate it but then you need to wire more PINs from nRF52 DK (see my links in my answer).

    You are right about target identification (or better saying lack of) in SEGGER J-Link...

  • ...but that can be done by observing the boards after flashing (one should have new - hopefully working - firmware) or you can easily add read of specific FICR register address to your nrfjprog script so you can identify target nRF5x chips by burned serial number (which is then normally also used as Adv. = MAC address).

  • @shampoo glad to hear that flashing through nRF52 DK works. I'm quite surprised about "bricking" because you would really need to "burn" some component on Sparkfun board, otherwise it should be pretty much impossible to brick it just by loading buggy FW. Make sure that wiring, power lines and SW on PC side are OK, I've met many boards which appeared to be "bricked" but just by re-wiring or SW (nRFTOOLS/SEGGER J-Link SW packages) upgrade allowed to use "recover" option in nrfjprog or nRFgo Studio and boards were again fully usable;)

  • @endnode. OK, I did not understand what the Sparkfun "probe" does. But our conversation teaches about the different ways of programming a board: 1) downloading via UART pins by a boot loader and 2) downloading via SWD pins by a debugger. Maybe shampoo means by "bricked": I programmed the target by the second method (using the NRFDK) and now the first method (the Sparkfun FTDI probe) doesn't work. Which makes sense since the second method erases the boot loader in the target FLASH that the first method depends on. Shampoo could "unbrick" by using the second method to burn the boot loader back onto the target?

  • @bootchk you are right, this could be it! If original UART bootloader FW is needed then @shampoo needs to either add it into his FW build or simply get the binary and flash it there once playing with SWD is over.

Related