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

How to just flash applications on nRF52840/pca100056 with nRF connect?

Hi I am following the instruction in the following link to do a open DFU through USB UART:

https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader#h23sjziacp7vrw0scs2t3tua1ax0426

In step D3, it says:

"D3. Use nRFConnect/nRFToolbox app either on the phone or on PC to connect and do an OTA DFU using the .zip file you copied (Press DFU button)."

Well nRFconnect cannot flash zip files. nRFconnect can only flash hex file with mbr built in it (there's only Add hex button on the interface as far as i can see)

What's going on? Is the instruction correct? Or does it mean use other tool with the zip file we created?

So my questions here are:

1. How to flash just the application hex file with nRFconnect? Obviously following the guide above ends up creating a zip file which I cannot use with nRFconnect.

2. Assuming that zip file is irrelevant, let's say we go ahead and flash the device with hex file. Obviously just having the hex file from the project is not enough, it needs to have mbr built in it (otherwise nRF connect interface has "write" button greyed out). So how to build a hex file that has both application and mbr in it?

3. Are nRFconnect even the recommended tool to do DFU? Why following the guide ends up with a zip file we cannot use? I assume you can use that zip file with nRFUtil or nrfjprog? So which tool we should use? nRFconnect or nrfjprog?

Thanks.

Parents
  • "D3. Use nRFConnect/nRFToolbox app either on the phone or on PC to connect and do an OTA DFU using the .zip file you copied (Press DFU button)."

    OTA DFU means over the air DFU, and you have to perform it over BLE. In the tutorial, you are building and flashing the BLE Secure DFU example and that will make the nRF52 chip advertise "DfuTest". You have to use another device, like a phone or the computer to scan for this advertisement, connect and eventually perform the DFU. If you are using the phone, do the following:

    • Open the nRF Connect App on the phone and click on "SCANNER", then connect to "DfuTest"

    • Next, perform DFU by clicking on "DFU" in the top right corner:
      • Then you can upload a ZIP file, which will be transferred to the nRF52 chip with the bootloader

    If you want to perform DFU using the nRF Connect APP on the computer, you have to use the "Bluetooth Low Energy" app inside the nRF Connect app. Then you have to connect another nRF5x (or dongle) to the computer in order to scan and connect to the bootloader. 

    If you want to perform DFU over UART instead, you have to use one of the UART examples inside examples\dfu\secure_bootloader instead and use the nrfutil tool to perform DFU from the computer over a serial link.

    Best regards,

    Simon

  • Hi thanks for your answer, however my concern is not addressed.

    In my question I wrote:

    "Well nRFconnect cannot flash zip files. nRFconnect can only flash hex file with mbr built in it (there's only Add hex button on the interface as far as i can see)"

    So can nRF connect flash zip files? I don't see any where you can flash zip files on to the chip through nRF connect. If you try to flash a zip file, nRF connect simply say wrong file type, can not parse. It looks like nRF connect can only flash hex files. Is that true?

  • If you are talking about the nRF Connect Programmer app (desktop), you are correct, you can only flash hex files.

    However, the zip files should not be flashed (through the Interface MCU), they should be transferred via DFU. In order to transfer the files using the nRF Connect app, you have to use the Bluetooth Low Energy app:

    Best regards,

    Simon

Reply Children
No Data
Related