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

PCA10059 programming problems.

Hi,

Just got four 52840 USB dongles, with the intent to evaluate the Nordic BT Mesh.  But I've been  unable to get even a simple Blinky example programmed on the dongle.  I've tried both Windows and Mac, I'm sure I'm doing something wrong, any pointers are appreciated.  I found this info the forum, but my errors are somewhat different:

https://devzone.nordicsemi.com/f/nordic-q-a/36844/nrf-connect-programming-pca10059-issue?ReplySortBy=Votes&ReplySortOrder=Descending

When using nRF Connect v2.4.0, I can see the device and connect to it.  But it will not let me write or erase the device, I get a box under the recover button that says "Only single writable region is supported", and both the "Write all to devkit" and "Recover" buttons are disabled.  See attached image

I also tried nrfutil on both Windows and Mac OS, and both report a similar problem while attempting to generate a zip file.   Tried with both python2 and python3:

nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0xa9

produces the following:

$ nrfutil pkg generate --debug-mode --application ble_app_blinky_pca10059_s140.hex blinky_package.zip --hw-version 52 --sd-req 0xa9

|===============================================================|
|## ## ### ######## ## ## #### ## ## ###### |
|## ## ## ## ## ## ## ### ## ## ### ## ## ## |
|## ## ## ## ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####|
|## ## ## ######### ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ## ## ## ### ## ## ### ## ## |
| ### ### ## ## ## ## ## ## #### ## ## ###### |
|===============================================================|
|You are generating a package with the debug bit enabled in the |
|init packet. This is only compatible with a debug bootloader |
|and is not suitable for production. |
|===============================================================|


|===============================================================|
|## ## ### ######## ## ## #### ## ## ###### |
|## ## ## ## ## ## ## ### ## ## ### ## ## ## |
|## ## ## ## ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####|
|## ## ## ######### ## ## ## #### ## ## #### ## ## |
|## ## ## ## ## ## ## ## ### ## ## ### ## ## |
| ### ### ## ## ## ## ## ## #### ## ## ###### |
|===============================================================|
|You are not providing a signature key, which means the DFU |
|files will not be signed, and are vulnerable to tampering. |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments. |
|===============================================================|

Traceback (most recent call last):
File "C:\Users\egross\AppData\Local\Programs\Python\Python36-32\Scripts\nrfutil-script.py", line 11, in <module>
load_entry_point('nrfutil==3.5.1', 'console_scripts', 'nrfutil')()
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\nordicsemi\__main__.py", line 632, in generate
package.generate_package(zipfile_path)
File "c:\users\egross\appdata\local\programs\python\python36-32\lib\site-packages\nordicsemi\dfu\package.py", line 344, in generate_package
for key, firmware_data in self.firmwares_data.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Any ideas or pointers are appreciated.   The various commands and GUI don't quite match the documentation, so I'm hoping its just something simple that I'm missing.

Ed

Parents
  • I am seeing a similar issue.

    Please see:

    https://devzone.nordicsemi.com/f/nordic-q-a/36381/nrf52840-dongle-write-problem

    Not sure if it's the official response, but one user says:

    "for the time being loading projects to the dongle using a softdevice is not supported by the nRF Connect for Desktop app. "


    UPDATE 1:

    You can program the dongle via SWD if you have a DK. Just power it from the DK so VTG is detected correctly.


  • Hi,

    This is correct. The nRF Programmer app for nRF Connect for Desktop does not currently support programming the SoftDevice to the dongle, but this will most likely be supported in the next release. The only option at this point is to use nrfutil, which is part of nRF5x-Command-Line-Tools.

  • Yes, all precompiled example hex files that need the SoftDevice include it within the hex file. This is usually a good thing, but you cannot use it to generate the DFU zip. You should build the example instead and use the resulting hex file which only contain the application.

  • Einar, from my post 4 days ago, do you have any suggestions to get extended advertising running on a PCA10059?   I found some example code on the web for an earlier version of the SDK and softdevice, but I can't a modifed blinky or rscs to run on the PCA10056.  

  • Hi,

    I did not spot the extended advertising question. The short answer is that we do not have any example for it on PCA10059 (nRF52840 dongle), but the Running Speed and Cadence Service Application example demonstrate extended advertising and has a project for the nRF52840 DK. Not that extended advertising is quite limited in S140 version 6.0.0 which is part of SDK 15.0.0, but it has improved in S140 version 6.1.0 S140 version 6.1.0 which will be part of the next SDK release.

    Can you please make a new thread for extended advertising question if you need any follow-up on it? Keeping separate topics to separate threads make them easier to follow and increases the likelihood of them being useful for others.

  • Hi, can you confirm that, as of today, this is still valid for nrf52 usb dongle on windows:
    1) It is NOT possible to flash via USB using the ses 'build and run feature' menu
    2) It is NOT possible via USB using nrf connect programming app due to error "DFU failed: Error message for known extended error code from DFU target: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice."
    3) It is possible via usb using the nrfutil. In this case, is it possible to add ses post-build configuration to automatically execute nrfutil? If so, can someone provide steps, command line or videos on how to do it?
    4) It is possible to flash via "nrf52 DK and tag connect cable" using ses 'build and run feature' menu

    Thanks

  • Hi,

    gio said:
    1) It is NOT possible to flash via USB using the ses 'build and run feature' menu

    Yes. It is not and will never be possible to program the nRF52840 dongle directly from SES. (The exception is if you hook up an external debugger and connect that to the nRF52840 dongle.)  

    gio said:
    2) It is NOT possible via USB using nrf connect programming app due to error "DFU failed: Error message for known extended error code from DFU target: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice."

    No. The nRF Connect Programmer app is now capable of programming the nRF52840 Dongle. However, you need to program it with an application that is suitable (projects for pca10059). To be suitable the application must be built with flash and RAM start addresses and size white make room for the MBR and Bootloader (please see project settings for one of the pca10059 projects in the SDK). You may also have to press the button while inserting the dongle to make it enter DFU mode. It will not be recognised by the Programmer app otherwise.

    gio said:
    3) It is possible via usb using the nrfutil. In this case, is it possible to add ses post-build configuration to automatically execute nrfutil? If so, can someone provide steps, command line or videos on how to do it?

    It might be possible, but I have not attempted to do so. You would not be able to debug in any case, so I do not see a significant benefit of programming from SES. The lack of a debugger makes the Dongle a bad development platform in any case, so it would be better to use a DK.

    gio said:
    4) It is possible to flash via "nrf52 DK and tag connect cable" using ses 'build and run feature' menu

    Yes, you can program (and debug) an application on the nRF52840 dongle using the DK as an external debugger.

Reply
  • Hi,

    gio said:
    1) It is NOT possible to flash via USB using the ses 'build and run feature' menu

    Yes. It is not and will never be possible to program the nRF52840 dongle directly from SES. (The exception is if you hook up an external debugger and connect that to the nRF52840 dongle.)  

    gio said:
    2) It is NOT possible via USB using nrf connect programming app due to error "DFU failed: Error message for known extended error code from DFU target: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice."

    No. The nRF Connect Programmer app is now capable of programming the nRF52840 Dongle. However, you need to program it with an application that is suitable (projects for pca10059). To be suitable the application must be built with flash and RAM start addresses and size white make room for the MBR and Bootloader (please see project settings for one of the pca10059 projects in the SDK). You may also have to press the button while inserting the dongle to make it enter DFU mode. It will not be recognised by the Programmer app otherwise.

    gio said:
    3) It is possible via usb using the nrfutil. In this case, is it possible to add ses post-build configuration to automatically execute nrfutil? If so, can someone provide steps, command line or videos on how to do it?

    It might be possible, but I have not attempted to do so. You would not be able to debug in any case, so I do not see a significant benefit of programming from SES. The lack of a debugger makes the Dongle a bad development platform in any case, so it would be better to use a DK.

    gio said:
    4) It is possible to flash via "nrf52 DK and tag connect cable" using ses 'build and run feature' menu

    Yes, you can program (and debug) an application on the nRF52840 dongle using the DK as an external debugger.

Children
  • Ok, thanks for answers.

    2) Please see pictures below. I'm using the project ble_app_blinky_pca10059_s140 included in SDK 15.2.0. As can be seen from the pictures, the compiled hex does not contain neither bootloader, neither softdevice, only application. Start addresses seems to correctly overlap with the app on the dongle, not over memory blocks. Clicking "Write" on nrfconnect app, asks for softdevice and then selecting s140, it fails.

    https://ibb.co/c27vv0
    https://ibb.co/hXH62f
    https://ibb.co/gZiDhf
    https://ibb.co/i8rNa0

    3) My aim is to have a unique environment where to develop and flash the device in a very simple way, by clicking once a menu option, withouth having to rely on external nrfconnect apps or extra steps. In a class of 50 students it would be feasible to let them experiment writing simple firmware with 50 USB dongles.On the contrary it would not be feasible to buy a DK, a tag connect cable and a dongle for each.

  • I assume you have S140 version 6.1.0? There is a limitation in the nRF Connect Programmer app that you have to select SoftDevice version from a drop-down. So if the programmer app is not updated for the current SoftDevice it will not allow you to program the app alone. I have created an internal feature request suggesting that it be possible to select to skip the SoftDevice ID check (by setting ID 0x00). In the meantime the workaround is to simultaneously install the application and SoftDevice (by adding the SoftDevice .hex file in addition to the application .hex file before clicking "Write".

Related