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

NRF52 dongle.... can't program with Segger (No idcode Error) after JLink Erase All

Hi All,

I have been busy trying to get my application programmed onto my NRF52 dongle by using the Nordic NRF52 DK board as a Segger debug/programming interface. All was going well and I managed to program the board with the 'blinky' example written especially for the  PCA10059.

Unfortunately though whilst trying to put my real application onto the target I went into JLINK and did an 'Erase All'.... now when I go into Segger studio and try to program the device with the blinky I get 

Is there a way to 'unbrick' my device??.... I have read a few suggestions on the forum but nothing has worked so far - I've tried using nRF MDK tools and running

> nrfjprog --recover

but I got :

If I put a new NRF52 donge in place of the origonal I can happily program the blinky code - so I know the JTAG interface and the method works okay.

Any help would be appreciated to try and unbrick the device

Cheers

Michael

  • Hi Michael,

    Have you taken a look at the getting started documentation for the dongle? There's also a dongle user guide here that could be helpful. Have you tried programming the dongle via nrf connect programmer app before you used the dev kit debug out port?

    The default method of programming the dongle is via the NRF Connect for Desktop Programmer application via a DFU. That is why there is a pre-programmed bootloader in the dongle flash. You have probably deleted this bootloader, so I do not believe you will be able to use nRF Connect to unbrick the dongle (i.e. the dongle needs to be in bootloader mode to program applications).

    I guess you have already tried programming the dongle via nrfjprog, right? I would suggest you to program the open BL example from SDK 15.1 to the dongle (i.e. nRF5_SDK_15.1.0_a8c0c4d\examples\dfu\open_bootloader\pca10059_usb\ses). This is the BL that is pre-programmed on the dongle when it is shipped out to customers. Unfortunately, since the BL is not secure, you will not be able to upgrade the BL via the nRF Connect app. You would need to do this via a segger j-link (e.g. debug out port on nRF 52 DK).

    You will however still be able to use the nRF Connect programmer app. I would test this by first downloading the open BL to the dongle via the 52 DK, then download the latest nRF Connect for Desktop & try to program the softdevice & the ble blinky application from sdk 15.1. Hope that helps! Good luck!

    Kind Regards,

    Bjørn

  • Hi Bjørn

    After not touching the development system all weekend, I went to try some of your suggestions but was confronted with a new error whe trying to run the blinky application on both the NRF52840 DK and the NRF52840 dongle.

    Error reported: Additional Load File[0] "../../../../../../components/softdevice/s140/hex/s140_nrf52840_5.0.0-2_alpha_softdevice.hex does not exist."

    I have managed to solve this with this solution found in the forum:

    https://devzone.nordicsemi.com/f/nordic-q-a/28125/segger-embedded-studio-can-t-find-softdevice-binary/110969#110969

    I don't know why I suddenly got this error against my project as I haven't changed anything.... but with this new error fixed in the Segger environment I tried to reprogram the dead NRF52 dongle - and it now programmed without any issues via the Jlink interface (using the NRF52840 DK board as a programmer/debugger)

  • Great to hear! If I were you, I would try programming the dongle via the programmer app too once you have programmed the BL onto the dongle. I have tried flashing the softdevice & ble_app_blinky via the programmer app & everything works fine.

  • Hi Bjørn

    I think I have found out the problem, I have my dongle connected via the Jtag interface to my NRF52840 Preview DK board (it acting as a programmer). I was supplying power to the dongle through my laptop USB port. When I did a full part erase of the dongle it will no longer connect via Jlink & I get the no idcode error appear. However, if I power the dongle from a USB power adapter instead of my laptop USB port I can establish a Jlink connection to the device (and erase and program the device). - any idea why the power source  (USB adapter plug vs my PC USB socket) would have an effect??

    The only problem I have now is how can I get back to the working blinky example from a full device erase? - I have tried programming tdongle with the s140 soft device and the blinky.hex (PCA10059 version), but the routine does not flash the leds... is there anything else I need to load onto the dongle?? 

    Regards

    Michael

  • Hi Michael,

    Do you have any issues with that laptop usb port? Can you program a dev kit from that usb port? It seems to me that the usb port is not giving the dongle enough power. Could you try with another dongle to see if that works.

    I have had issues with the dongle if I connect it to a usb hub that is connected to a docking station. If the usb hub is connected directly to the laptop, everything works fine.

    Are you programming the blinky application from the peripheral folder? Is so, you won't require the softdevice at all (since you do not require BLE). If you use ble_app_blinky from the ble_peripheral folder, you will need the softdevice.

    If you want to program via nRF Connect for Desktop, you will need to flash the bootloader to the dongle. Take a look at this example here: nRF5_SDK_15.0.0_a53641a\examples\dfu\open_bootloader\pca10059_usb\

    You should flash the softdevice first, then the bootloader & finally the application (if you are using ble_app_blinky for example). Then, you can try upgrading the application via the newest nRF programmer app on nRF Connect for Desktop.

    Kind Regards,

    Bjørn

Related