Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PCA100059 (NRF52840 Dongle) lost loader

Dear

I modify the example of PCA10056 mesh light-server for PCA10059 and it works after I program PCA10059 by nRF Connect –programmer go through USB interface. But there is a problem that the PCA10059 as a mesh node can not be change to other mesh net (be re-provisionered by other provisioner ), unless the PCA100059 can be erased. Because there is not any tools can erase the PCA100059 (I just have DK and dongle) and DK can erase chips of  NRF52840 by nrfjprog tools, So I modify the dongle(Add a P1 , short SB1  and open SB2) and a DK (short SB47 and open SB40). Connecting the dongle's  and DK's  P19 , and try to erase (by nrfjprog)and program(by SES or nRF Connect –programmer) the dongle go through the DK . The result is that erase operation and programming operation should works, but the light-server of PCA10059 code do not works.

My question is: 

Q1: Is there any wrong or any imprortent point which I need  review when erase and program the PCA10059 by DK.

Q2: Because the PCA100059 , which be erased and programmed by DK,  can not be found by nrf-command -programmer when I change it back to USB mode (by short SB2 and open SB1) . So it should lost the loader . How I can recover it's loader. If I design my application board with my chips, how I can program my code to the new chip on my board without loader.

Q3: The nrf52840 have nomole power mode (DK) and high voltage power mode(dongle USB mode). When I modify the light-server code for PCA10059, I add some code for setup the GPIO from 1.8V output to 3V. What happens if the chip is in normal power mode and GPIO is in 3V mode? Will the chip be damaged?

Q4: I want compare the ble-app- blanky example project for PCA10056 and PCA10059. But I can not find their code and there is only the hex files in the nRF5_SDK_16.0.0_98a08e2 folder. Is there some one can send me these project code

Thanks,

Di-sheng

Parents
  • Hi Dison, 

    You are right about the issue that when you provisioned the dongle you can't erase it and change it to another node. It's the limitation of the current bootloader on the dongle. It can flash new application but it can't erase the application's data. 

    Reprogram the dongle via SWD interface via DK is the right way to go. But I don't think you need to cut SB2 and connect SB1. You can just plug it to USB port and flash the dongle via the DK via the P1 port. 

    After you have erased the Dongle you can flash the softdevice and the mesh application just like how you do it with the DK. But there is a note that the reset pin is connected to P0.19 . So make sure this pin won't trigger a reset. 

    After you have erased the flash of the Dongle , the bootloader is erased that's why you don't see it in the nRF Connect Programmer anymore. You can flash it back using the \examples\dfu\open_bootloader\pca10059_usb

    3. No it shouldn't be a problem

    4. Can't you just compile the example for PCA10059 and get the hex file ? 

  • Hi Hung Bui

    Thanks for your reply.

    Your reply above confirms that the method I used is correct.

    As for what you said, there is no need to disconnect SB2 and short-connect SB1 on DONGle, I would like to confirm again, because NRF52840 chip only has two power supply modes (ordinary mode VDD and VDDH short-connect, 1.7-3.6V) and high-voltage mode (only connect VDDH, up to 5.8V). If SB2 keep connect and SB1 keep open, when DK is connected to DONGle,The power input of NRF52840 will be VDD= 3V and VDDH=5V, which do not conform to either of the two power supply modes. Then can the chip work normally and will not be damaged?

    Because my 2pcs Dongle lost the loader(that is, cannot be found by programmer), I try to flash the "\examples\ DFU \open_bootloader\ pCA10059_USB" back to Dongle as you said. Although I tried all DFU items in SKD and Mesh (including no-serial-number), but it is not success. So far, I think the erasure of dongle by DK is successful, because two dongle lost the loader, but programming dongle by DK is failed, because writing back to DFU and programming the light-sever code of PCA10059 which it have been worked on PCA10059 by programmer flashing are not successful. Could you help me to analyse what went wrong?Is there anything missing from the modification of DK?

    I noticed that you highlighted the reset pin being connected to P0.19. So I looked over the dongle and saw that reset was connected to P0.18 P0.19,P0.21,P0.23, and P0.25 at the same time. I wonder why they are connected in this way, as the default state of P0.19,P0.21,P0.23, and P0.25 is input, but a valid reset signal (or output by the application) will reset the chip. Could you explain the reasons and pros and cons of this connection in detail?

    Others, If I wanted to program a DK by SES I have to compile the source code and then download it to DK by SES, but if I just had the HEX file instead of the source code, could I use SES to download the DK? and how?

     

    Thanks,

     

    Di-Sheng

  • Hi Di-Sheng, 

    If you connect via the Debug Out port on the DK there will be no VDD supply from the DK to the dongle. Pin 1 on the programming/debugging port is only to detect if there is an external board connected or not. Not to provide power to the external board. 

    The voltage on the VDD pin when the VDDH is supplied (5V) should be 3.3V as far as I know. 

    On the 2 dongles that you have erased, please try to test flashing normal application first, to make sure that it works. For example blinky or ble_app_blinky. 

    After that you can test flashing the bootloader. Note that you would need either MBR flashed or softdevice flash for the bootloader to work. 

  • Hi Hung Bui

    Thanks for your reply.

    As for the VDD of Dongle, I have done a test. After the erased Dongle is connected to USB, VDD=1.8V, while after the normal Dongle is connected to USB, VDD=3.3V. I know that when the VDD is 1.8V, it cannot be programmed by DK, so I have tested the VDD value of the erased Dongle after connecting both USB and DK, It is 3V. Before writing DFU, I wrote blinky, which works normally except that it cannot be found by Programmer. Dongle erased after writing DFU fixes USB interface function. It can be found by Programmer and it's VDD =3.3V when it connect to USB.

    Although Dongle has been fixed, I still have the following questions:

     Q1. How to avoid erasing UICR pages when using the nrfjprog tool, or are there other ways to erase application data without erasing UICR pages?

    Q2. Does the newly purchased NRF52840 chip already contain MSB and Boot-Loader?

    Q3. After repairing the DFU of Dongle, I tried to flash the Light-sever code of PCA10059 (via USB and DK), but the program did not work. This program was working to flah Dongle via USB before performing erasure. So is there difference between the dfu of SDK and the boot-loader code in the chips before?

     

    Thank you!

    Di - Sheng

  • Hi Di-sheng, 
    Q1. You can erase the only pages or sections you want using nrfjprog. If you programming an application to nrfjprog you can use --sectorerase then only the area occupied by the application is erased. 
    Q2. No, it's blank. Only the PCA10059 dongle contain the MSB and bootloader by default. 

    Q3. I'm not sure, you may need to use the debugger on the DK to debug it. You can print out the log on RTT to check. By theory the DFU bootloader from the SDK should work exactly the same as the included bootloader. 

  • Hi Hung Bui

    Thanks for your reply.

    The Dongle have been fixed. I will try the light switch sever again.

    Thank you very much!

    B,Rs

    Di-Sheng

Reply Children
No Data
Related