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

nRF Connect Won't Load 52840 Dongle Memory Layout

Hi Nordic Community,

I am trying to build a network using the OpenThread protocol and the nRF52840 chip. I have several Dongles, but I can't figure out how to flash the OpenThread examples (or any hex file) to the Dongle. I think my problem is with nRF Connect. I am trying to follow the nRF52840 Dongle Programming Tutorial, Adapt a simple example (without SoftDevice), but I get stuck when I "select device". The "device memory map" will not load and the device buttons ("erase all", "erase & write", "save as file", "reset", "write", "read") can't be pressed.

I want to know if I'm using nRF Connect wrong or how I can flash my nRF52840 Dongle.

Here is my workstation setup:

I'm running Ubuntu 18.04 on a x86 machine

$ uname -a
Linux ideapad 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I have SEGGER JLink v6.6.4 Installed. I can flash a development kit using nrfjprog, so I know this is working correctly.

I have nRF Connect v 3.3.0 Installed.

I have nRF Connect Programmer v1.3.1 installed

I have followed and verified all the steps in the nRF Connect Getting Started Guide v1.0.6.

This is my problem:

nRF Connect will load .hex files but will not "read", "write", etc from the Dongle. It will also not load the Device memory layout.

Here is a screenshot of the Programmer with the Dongle not loading

Here is a copy of the nRF Connect verbose log:

2020-03-20T07:45:31.883Z INFO Application data folder: /home/ender/.config/nrfconnect/pc-nrfconnect-programmer
2020-03-20T07:45:31.946Z DEBUG App pc-nrfconnect-programmer v1.3.1 official
2020-03-20T07:45:31.946Z DEBUG App path: /home/ender/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
2020-03-20T07:45:31.946Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.3.0)
2020-03-20T07:45:31.946Z DEBUG nRFConnect path: /tmp/.mount_nrfconplLymt/resources/app.asar
2020-03-20T07:45:31.946Z DEBUG HomeDir: /home/ender
2020-03-20T07:45:31.947Z DEBUG TmpDir: /tmp
2020-03-20T07:45:31.962Z INFO Using nrfjprog library 10.5.0, pc-nrfjprog-js 1.6.0
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS0
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS1
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS10
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS11
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS12
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS13
2020-03-20T07:45:32.154Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS14
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS15
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS16
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS17
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS18
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS19
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS2
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS20
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS21
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS22
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS23
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS24
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS25
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS26
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS27
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS28
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS29
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS3
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS30
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS31
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS4
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS5
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS6
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS7
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS8
2020-03-20T07:45:32.155Z VERBOSE Could not fetch serial number for serial port at /dev/ttyS9
2020-03-20T07:45:35.295Z INFO Using USB SDFU protocol to communicate with target
2020-03-20T07:45:38.623Z INFO Parsing HEX file:  /home/ender/repositories/nrf-sdk/examples/thread/cli/ftd/usb/hex/nrf52840_xxaa_mbr_pca10059.hex
2020-03-20T07:45:38.640Z INFO File was last modified at  12/19/2019, 11:08:48 PM
2020-03-20T07:45:38.801Z INFO Data block: 0x00001000-0x0005C37C (0x0005B37C  bytes long)

And here is a copy of the nrfconnect-system-report:

# nRFConnect System Report - 2020-03-20T05-15-47.186Z

- System:     LENOVO 80TV
- BIOS:       LENOVO 3JCN19WW
- CPU:        1 x Intel® Core™ i7-7500U 2.70 GHz 4 cores (2 physical)
- Memory:     715.1 MB free of 7.7 GB total
- Filesystem: /dev/sda2 (ext4) 915.4 GB 1.9% used

- OS:         Ubuntu (18.04.4 LTS) linux x64

- Versions
    - kernel: 5.3.0-42-generic
    - git: 2.17.1
    - node: 12.0.0
    - python: 2.7.17
    - python3: 3.6.9

- Connected devices:
    - /dev/ttyACM0: FC3B2C7A8A9D 

  • Hi Sidney, 
    Could you please clarify that you were testing with a PCA10059 dongle ? 
    Have you switched the dongle to bootloader mode ? (press the reset switch, there should be a red LED breathing light)
    Please be aware that the dongle is not a development platform but rather to be used as backend for other tool, such as nRF Connect BLE. If you plan to use it for development, I would strongly suggest you to solder the SWD header and then use  a DK/a programmer to program it (via the Debug out port) 


    The OpenThread firmware should be modified so that it start at address 0x1000 (to cope with the MBR) otherwise the bootloader will no longer work. 

  • Hi Hung Bui,

    Thank you for your reply, and sorry for taking a few days to get back to you. I can confirm that:

    1) I am using the PCA10059 dongle
    2) The red led is blinking at about 1Hz when it is plugged into the computer

    I have three followup questions after your response:

    1. My understanding is that nRF Connect will account for the MBR (following this guide) but my problem is that nRF Connect will not read the memory layout on the Dongle. The screenshot I attached in the original posting shows diagonal lines in the memory layout BUT the guide I am following, nRF Connect shows the MBR in the memory layout. I cannot get nRF Connect to achieve "Firmware: Bootloader found". I have tried this with 3 brand new Dongles with the same problem, so I believe that my nRF Connect instance is at fault.

    2. You suggest flashing the dongle from the Dev Kit. Is there a guide to do this?

    3. Can you confirm that I would only need to set the start address to 0x1000 if I were using nrfjprog to flash the Dongle, and not when using nRF Connect? And if so, would you do this when converting the binary to hex:

    arm-none-eabi-objcopy -O ihex --change-start 0x1000 <BINARY_FILE> <OUTPUT_HEX_FILE>

    To give you more context I would like to build a very simple OpenThread network as a proof of concept. I have one 52840 Dev Kit (pca10056) that I have set up as the NCP for an otbr Docker container. I have several Dongles (pca10059) that I want to run a very simple program to periodically send messages to the base station. My goal is to monitor the network topology and test OpenThread.

  • Hi Sidney, 

    I don't think using arm-none-eabi-objcopy to shift the hex is a good idea. There could be a call in the code that use absolute address (for example the vector table) and shifting the hex would cause the issue. 

    The way you do it is in the project setting of the source code you change the flash start address (IROM1) to 0x1000 and recompile the code. I have flashed many dongles to use as OpenThread node by doing so.

    nrfjprog is not capable of programming the dongle because by default it's programmed by DFU process, not by using SWD programming. 


    It seems that it's the issue with the communication between the dongle and the PC. Could you try on another PC (preferably running Windows) just to confirm that it's not the dongles issue.

    To be able to flash the dongle directly (not using the DFU/bootloader) you would need to solder the 10 pins header on port P1 of the dongle. It's the same header on the Debug In and Debug Out port on the PCA10056. If you don't have one You can de-solder the header on port Debug In of the PCA10059 (most of the time not used) to solder it on the dongle P1. Then you just need the 10pin cable to program the dongle from the PCA10056. You can just program it like a normal DK. And make sure you erase the bootloader if you want it to operate like a DK. 

  • Hi Hung,

    Thank you for the suggestion, I tried it running nRF Connect on Mac and I can successfully flash the Dongle. This can only be a temporary solution for me though, since my main/only computers run Linux. I would like to get nRF Connect working on Ubuntu. I think that it is hanging during "Using USB SDFU protocol to communicate with target". Is there a library I am missing on Ubuntu to use USB SDFU?

    Note: I can use nRF Connect to flash the Dev Kit on Ubuntu, but it reads the memory using nrfjprog, not USB SDFU.

  • Thanks Sidney, 
    I will forward the issue to our app team and get back to you. 
    I saw a similar report on github here and the customer mentioned that he uninstall and install the app again and it helped him. Could you try ? 

    https://github.com/NordicSemiconductor/pc-nrfconnect-programmer/issues/160

Related