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

  • Hi

    Here is what I have done..

    I have the wires connected as shown in the photo above. On the Sparkfun board are two LEDS, a red one (for power) and a blue one (pin 7). The sparkfun board does have a bootloader. It requires you hold down two buttons and when a flashing sequence starts, you can use an Arduino IDE to push your firmware over.

    OR, if you rather, as the tutorial states, you can bypass the booloader and use the Nordic nRF52 DK to load the firmware via JTag and SWD. This is what I am trying to do.

    To test, I have a .hex that was done on the Arduino that I know works. I have tested this using Sparkfun's bootloader. It merely blinks LED 7 (the blue LED). After hooking up the Sparkfun board to the nRF52 I flashed this .hex to the board.

    No LEDs blink, only the red led indicating power. This is why I am thinking maybe it's bricked.

    I can't get into the Sparkfun bootloader anymore either. So maybe the flashing did work and it overwrote Sparkfun's bootloader ?

    Maybe someone can give me some things to try to see if the board is in fact connected correctly ?

  • Then it's pretty probable that your FW which uses Arduino IDE and UART bootloader works only on top of it. If you used JTAG/SWD then you probably erased whole flash of nRF52 chip and hence loading that FW might pass but it won't work. But I bet you are not the first one who did this, could you find anything on this in their tutorials or forum (if they have any)?

  • I emailed Sparkfun.. Let's see what they say.. Thanks for all the replies. You are all very helpful and I appreciate it.

  • Oh and I am going to try and re-load the original firmware to see if I can get that to work..

  • Maybe: the hex that works when using a boot loader is downloaded to an address above(?) the boot loader. When you reset the board, it starts executing at the "reset" address specified in the interrupt vector table, said address points to the boot loader. At some point the boot loader jumps to the start of your app. That is different than what happens when you power cycle a board without a boot loader: the address of the start of your program should be the "reset" address of the interrupt vector table. IOW, the same hex that works with a boot loader won't work when downloaded by a debugger.

Related