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

PCA10059 Always enters bootloader when plugged in

I got a J-Link mini Edu today, and I wanted to try to experiment using it with my NRF52840 dongle.

To test it out I tried uploading some of my code and some examples, but I am getting some weird behaviour.

Whenever I use Segger embedded studio with the j-link to program the dongle, it uploads fine, and runs. However, If I disconnect and reconnect the dongle from the USB port of my PC, it always just enters the bootloader mode instead of running the code that was just uploaded.

If I program the dongle using the onboard bootloader, it works fine and I don't have any problems (but obviously I can't debug). I want to avoid a full chip erase since the J-link EDU mini only supports 3V programming, and the jumpers to configure the dongle to use external power are covered beneath the debug connector I soldered to the board. 

*Another thing I noticed, when I programmed my code that used logging with RTT, it didn't seem to work, and I am confident my code is correct, but that could be a separate issue.

Below are what nRF connect programmer shows when I select the dongle in bootloader mode or select the j-link. The j-link image looks quite strange too me.

  • UPDATE

    I have bit the bullet and fully erased the chip. Now I have connected the dongle to a 3.3V supply and used the J-link to upload the PCA10059 bootloader with mbr. Now when powered on it enters the bootloader ilike it should. Now I want to porgram the dongle, but not sure how I should. 

    1. Can I connect the dongle to the USB port on my PC and upload code as normal using the bootloader?

    2. Does the bootloader file set REGOUT0 to high voltage mode?

    3. Can I connect the dongle to my J-link and upload code that way, but keep the bootloader intact so I can program it either way?

  • Hi Eric

    1. Have you seen the nRF52840 Dongle programming tutorial? It should explain every aspect of what's possible and not with the nRF52 Dongle.

    2. You can set what regulator you like the chip to use in software in the register MAINREGSTATUS from the PS set to either Normal (0) or High (1).

    3. Yes, you can, again, see the Dongle programming tutorial.

    Best regards,

    Simon

Related