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

  • Since you have the Eclipse IDE, you should try using that to build and download the blinky example to your spark fun board.

  • @butch Some interesting things here to note:

    On the Nordic DK board I have the blink example running. It blinks the four leds in order.. I then modified the board to only blink pin 7 (the led on the sparkfun board). When I execute and debug this code the four leds on the Nordic DK board continue to blink. However, I am able to pause and step through.. So I ASSUME this is being executed on the Sparkfun board..

    Yet, the led on the sparkfun board does not blink.

    Also, if I get one of the wires wrong between the Nordic and the Sparkfun, I get an error for JLink. So I am thinking the connection is working. So it might be in the code. I will have to wait for Sparkfun to see.

    That being said, the Nordic DK board and the development environment is quite nice. I might have to convince my client to use that instead..

    The problem is the client wanted to just take the dev board and use it straight into production. Not sure that's wise with the Nordic DK board.

  • @bootchk Intel HEX format is self-consistent, it has addresses coded inside for every load command (typically every line with some range switches because it usually have shorter addressing then target memory). So if you have it you can easily see where it starts (= if there is something else loaded below).

    @shampoo I would recommend to disconnect VTG and GND Detect PINs from P20 and erase internal nRF52. And even better learn how to read particular address and before any flashing operation check what nRF52 S/N are you talking to. Regarding using any of these boards for "production": I hope you and your customer know about all the pitfalls of certification processes which are usually mandatory. I guess none of these were meant to be used for some real thing (except validation during development and DIY/hobbyists) and the same applies to Arduino SDK I'm afraid.

  • I managed to erase the internal nRF52.

    nrfjprog -i gives me: 682681926

    When debugging the code with the Sparkfun board connected I see:

    ------Target related settings------ Target device: nRF52832_xxAA Target interface: SWD Target interface speed: 1000kHz Target endian: little

    onnecting to J-Link... J-Link is connected. Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 2 2017 12:22:13 Hardware: V1.00 S/N: 682681926 Checking target voltage... Target voltage: 3.30 V Listening on TCP/IP port 2331 Connecting to target...Connected to target Waiting for GDB connection...Connected to 127.0.0.1 Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0x20010000) Read 2 bytes @ address 0x00000000 (Data = 0x0000) Target interface speed set to 1000 kHz Resetting target

    Thanks for the tip about this hardware for production. It's a very good point. I will tell my client.

  • nrfjprog -i gives you serial number of SEGGER J-Link OB chip/license, that will be always the same. I suggest to use something like nrfjprog --memrd 0x10000060 --n 8 -f NRF52 which should print-out 64-bit (8B) DEVICEID aka chip serial number. If you do it without Sparkfun connected then you get S/N of nRF52 on DK board, if you connected Sparkfun board then you get S/N of that chip, they must be different.

Related