This question comes from my high-level goal of testing I2C using the SWDIO/SWDCLK pins on the nRF52840 Dongle, so if there are faster ways to experiment with that functionality, I'm all ears.
Before the nRF52840 Dongle (PCA10059), I've been experimenting with the nRF52832 DK (PCA10040) and Sparkfun's nRF52832 breakout board. With this setup, it was easy to modify example code built for the PCA10040 and use the J-Link on that board to externally program the sparkfun board, without having to re-create the entire project for the generic nRF52832 board. It was also nice that these boards didn't need a bootloader, since I could flash code straight from my IDE or by using nRF Go, which felt as if it had less checks in place about which hex code it would try to flash. With nRF Go, it didn't object to me putting PCA10040 hex onto the Sparkfun board even though it was not a PCA10040.
Now back to the problem, I know it's a new product, but there are very few example projects that currently support the nRF52840 Dongle. My goal is to run code such as "TWI Scanner" on the PCA10059. There are no projects for the PCA10059 for this example, so I'm trying to use the precomiled code for the PCA10040 or the PCA10056 (nRF52840 DK), but neither are flashable. I know PCA10040 is for the nRF52832 not nRF52840, but I read in this DevZone post that "Code existing on the 52832 should run on 52840 without modification." Anyhow, I've already flashed "...blinky\PCA10059\..." so I'm familiar with how nRF Connect Programmer (v2.6.1) should work. When I load either example, say the TWI Scanner for PCA10056, I'm not able to click on the "write" option...
This experience has spawned a few questions:
-
Is the inability to write in nRF Connect Programmer because it knows the code is written for PCA10056 and my target is a PCA10059? If so, is there a way I can bypass this and flash this code anyways (using an IDE, nRF Go, nRF Connect, or any other methods)?
-
Alternatively, what are the steps I need to take to modify / recreate a PCA10056 example project and code such that they are compatible with a PCA10059?
- Can the nRF52840 DK be wired to program the PCA10059 like a generic nRF52 board? Is it necessary to solder a JTAG connector to P1 of PCA10059, or can the dongle be programmed by using only VCC (VBUS), GND, SWDIO & SWDCLK as is done here and here? I understand this would likely erase the bootloader.
Thanks in advance!