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

Blinky fails on PCA10059

Compiled Blinky client fails on Dongle PCA10059.

Precompiled version nRF5_SDK_15.2.0_9412b96/examples/ble_peripheral/ble_app_blinky/hex/ble_app_blinky_pca10059_s140.hex works correctly without problems.

But if I compile a version it fails totally. When powered up, dongle always goes to DFU-mode ( red led blinking ).

I have tried both package created and programmed with nrfutil and flashing directly using Seggers JLink. No difference.

Compiler: gcc version 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496] (GNU Tools for ARM Embedded Processors

Package creation: nrfutil pkg generate --debug-mode --softdevice s140_nrf52_6.1.0_softdevice.hex --application _build/nrf52840_xxaa.hex app.zip --hw-version 52 --sd-req 0x00 --sd-id 0x00

Package write: nrfutil dfu usb_serial -pkg app.zip -p /dev/ttyACM0

Source was unmodified example in installation drectory.

Build directory: nRF5_SDK_15.2.0_9412b96/examples/ble_peripheral/ble_app_blinky/pca10059/s140/armgcc

Parents
  • Hello,

    The --sd-id must match the ID of the Softdevice that you include in your update.

    So I tested with the following command to generate the packet:

    nrfutil pkg generate --debug-mode --softdevice ..\..\..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_6.1.0_softdevice.hex --application ..\_build\nrf52840_xxaa.hex --hw-version 52 --sd-req 0x00 --sd-id 0xAE dfu_test.zip

    (note that I used the gcc project, and generate the file from a folder within this folder (SDK15.2.0\examples\ble_peripheral\ble_app_blinky\armgcc\dfu_test, hence the ..\_build\nrf52840_xxaa.hex).

    Then I used the following command to program the device:

    nrfutil dfu usb_serial -pkg dfu_test.zip -p COM27

    And this works. When I tried to generate the packet with --sd-id 0x00, I can't run the application either. This is because the dongle doesn't think it has a softdevice after the DFU, and will assume it doesn't have all the necessary components to start the application, so it will stay in DFU mode.

    So try to change to --sd-id 0xAE

    Best regards,

    Edvin

  • Thanks Edvin Slight smile

    I forgot to mention that I tried previously --sd-id 0xA9, it was the only documented code I could find, but that didn't work.

    That 0xAE works just perfect. :) :D

    It seems to me that PCA10059 versions of the Makefile should have nrfutil package creation and dfu operations rather than flash operations!! Slight smile for programming the dongle.

  • Glad to hear that it worked out.

    You can use "nrfutil pkg generate --help" to see the different softdevice IDs. If the softdevice that you are looking for isn't listed you probably just need to update your nrfutil version.

    Best regards,

    Edvin

Reply Children
No Data
Related