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

Flashing pca10059

Hi, I have pca10059 dongle. I soldered goldpins to swdio and swdclk lines to be able to flash it using external nrf dk. So I connected external jlink programmer and was able to reset board. So I decided to erase it to flash my software. But right after erase command I was not able to do anything with dongle and I was just getting JLink errors. What is the solution are possbile problem?

Regards,

Michał

Parents
  • Hi Michał,

    The problem is that UICR.REGOUT0 register got cleared once you did the chip erase.  Thus changing the I/O voltage from 3.3V to 1.8V . Unfortunately, the only way to re-program the chip is to use an external J-link programmer that supports 1.8V programming. The Jlink lite on the dev kit requires a target voltage of >3v. Do you have an external programmer you can use?

    Our documentation should definitely include a warning about this. I will report it internally. 

  • Hi. No, I dont have access to external programmer, I only have nrf DKs. So what should I do ?

    Why this does not happen on pca10056 or pca10040?

  • Hi,

    The dongle operates in high voltage mode while the pca10056 is configured for normal voltage mode by default. If you have a pca10056 you can try to power it through nRF_USB instead as that should change the DKs VDD voltage to 1.8 V (measure to make sure).

    nRF52840-DK Debug out

  • I ran into the same problem. Is it safe to power the dongle externally, when I close SB1? (without USB connection, of course)

  • Yes, as long as you remember not to plug it into a USB port. Sorry that you ran into this problem. We will include a warning about this next time we update the documentation. 

  • I could reflash the dongle, but the main voltage regulator is still at 1.8V. What's the easiest way to set it back to 3.3V

Reply Children
  • It's probably easiest to set UICR.REGOUT0 with nrfjprog:

    nrfjprog --memwr 0x10001304 (UICR.REGOUT0 address) --val 0xFFFFFFFD (3V3 setting)

  • That's what I was looking for, than you.

    I'm not so familiar with J-Link yet, and didn't have the time to get gdb running.

    This should definitely go into the FAQ, as should a schematic showing how to connect the DK to the dongle with single wires, for recovery. It's not rocket science, but pulling the information out of two different manuals is somewhat time consuming.