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

Examples for nRF52840 Dongle

Taking a look through the SDK, there are very few examples using the dongle.  I've tried building some of the existing examples by changing the board definition in the preprocessor flags but haven't so far been able to download and try any code.

Are there any walkthroughs with SES that cover development for a beginner with the nRF series?  I'd ideally like to see something that delivered a service with LED control and button notifications as a custom service, then perhaps battery level by measuring VDD using the internal ADCs as a predefined service.

An updated version of nAN-36 would be great ( https://www.nordicsemi.com/eng/nordic/Products/nRF51824/nAN-36/55741 )

Thanks

Tim

Parents
  • Sorry for the delayed response. From what I can see, the following apps are available for the pca10059 dongle in sdk 15: examples/peripheral/cli, examples/peripheral/blinky, examples/dfu/open_bootloader, examples/connectivity/ble_connectivity, examples/ble_peripheral/ble_app_hrs, examples/ble_peripheral/ble_app_blinky.

    There is also more documentation available here on our Infocenter. 

    I have tested with the peripheral blinky example & programming worked fine via the Programmer app on nRF Connect for PC. Open the programmer app, connect to the dongle, compile the program in Segger Embedded Studio (SES) & press "Add a hex file" in the Programmer app. Then, locate the built hex file in SES (see path: nRF5_SDK_15.0.0_a53641a\examples\peripheral\blinky\pca10059\mbr\ses\Output\Release\Exe\) & press on button "Write All To devkit".

    If you want to use an application that requires the softdevice (such as the ble_app_blinky), I am not certain it will work on nRF Connect v2.4.0. You can try this yourself by setting the dongle into bootloader mode, connect to the dongle in the programmer app & flashing the softdevice hex found under nRF5_SDK_15.0.0_a53641a\components\softdevice\s140\hex. Then, you can flash the ble_app_blinky hex file & that should hopefully work. You may get an error, but just plug the dongle in & out & see if you can connect to the dongle via nrf connect on iOS or Android. The device name will be "Nordic_Blinky".

    Since you are quite new to Nordic, I would recommend getting a nRF52832 DK & start programming on that instead of the dongle. The dev kit is a lot easier to get started with & there are many more examples for the dev kit too.

    Here's a great guide to getting started with custom services on the 52 dev kit. We also have a getting started guide for SES on Youtube.

    Regarding battery level, you can take a look at the SAADC example from sdk 15, as well as this devzone blog post. I have also written a blog post regarding state of charge estimation using a Nordic Thingy:52 that may be useful. These two devzone answers may also be useful: link 1, link 2. Hope that helps!

     

  • Hello, I did some testing on this today. Unfortunately nRF Connect v2.4.0 Programmer app won't let you write a combined hex file to the NRF52840 Dongle. It says "Only Single writable region is supported". Maybe it will on a future release

  • Hi, I tested the same exact thing. I believe it might work if you flash the softdevice first using the programmer app & then flashing the application hex file afterwards. It works on the nRF Connect v2.5.0-alpha.2 with the programmer v1.0.0-experimental.3. I tested the ble_app_blinky example with the softdevice on the 52840 dongle yesterday. It is possible to download these versions here & here, but I would wait until the stable release of nRF Connect is out. You will be informed on nRF Connect for pc when a new update is available.

  • I believe it might work if you flash the softdevice first using the programmer app & then flashing the application hex file afterwards.

    I have tried the above and unfortunately it does not work. 

Reply Children
  • Did you test with nrf connect v2.4.0 & the programmer app v1.0.0-experimental.3? I tested by downgrading to nrf connect for pc v2.4.0, while still using the experimental v1.0.0-3 programmer app. The softdevice update went well, but when I reconnected to the dongle & tried to do a DFU of the application (ble app blinky), I got the error below. Did you also receive this error?

    The nrf connect v2.5.0-alpha.2 is only for internal use at the moment, but the nrf connect v2.5.0 should be out within three weeks. Full dongle programming support will be available then.

    To reiterate, I tested with nrf connect v2.5.0-alpha.2 with the experimental v1.0.0-3 programmer app & updating softdevice & FW at the same time was not an issue. The updates occur one after another, but you can add multiple hex files to the app. In other words, mergehex is integrated in the programmer app & you will not have to use the mergehex command line tool anymore.

Related