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

nRF52840 Overlapping .hex data & Soft Device match error

I am new to the Segger Studio and nRF52840 . (However not a Newbie to Microprocessors)

Off the Bat :- Blinky example works fine...

.....however when I try to get the PWM_driver example I get these errors below in picture.

The example is for "pca10056" which is why I followed the dongle guide below, adjusting predecessor to the nRF52840 and memory macros.

 https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial

however when I port across the program .hex file and the Soft Device .hex file ( S140) there is a memory clash. I have also tried S132 (also errors).

If I place just the program .hex and write to device a window pops up asking for a soft device selection !!! It does not matter which I choose (I went through all).

My Questions are :-

  1. Is there a specific soft Device for the nRF52840 ... (I could only find the recommended s140_nrf52_7.2.0_softdevice.hex ) ?
  2. How Can I tell which Soft Device is needed (i.e. from the examples). ?
  3. Can the Soft Device be Merged into code somehow in the Segger Studio ?

Any pointers would be greatly appreciated.

  • Hi,

    • Is there a specific soft Device for the nRF52840 ... (I could only find the recommended s140_nrf52_7.2.0_softdevice.hex ) ?
    • How Can I tell which Soft Device is needed (i.e. from the examples). ?
    • Can the Soft Device be Merged into code somehow in the Segger Studio ?

     Softdevices that are compatible with nRF52840 is described here. S140 is often used in our examples for the nRF52840. 

    The PWM example in the SDK doesn't use the softdevice, you would therefore get conflicting issues in the memory layout when you try to flash the softdevice and the pwm example in the same memory space. If you want to use both, then you need to merge a Softdevice example with the PWM example. The easiest would be to merge the PWM example into the ble_app_template example.  

    Merging checklist:

    • Merge the application logic such as main.c from the PWM example into the template example.
    • Include any source files if necessary.
    • Add path to the folders of the source files the PWM example uses.
    • Add the files themselves to the project. See this if you're using SEGGER.
    • Compare the sdk config file of two examples, and enable any peripherals/modules that isn't enabled in the template example already

    You can then proceed to follow the guidelines in the tutorial you shared under Adapt a BLE example (with SoftDevice) and program it using nRF Connect Programmer

    regards

    Jared 

  • The confusing part for me is that other Project Example's (not all though) are contained with-in a folder "named" with the actual Software device required, the pwm-driver example i want to run just gives a folder marked "blank" ! no indication of SD required.

  • Yes, which means that the example doesn't include a softdevice. All of the "blank" examples are under the peripheral folder which doesn't include any softdevice. The softdevice examples are found under the ble_central, ble_peripheral or ble_central_peripheral folder. 

    The peripheral only examples are meant to showcase how to use the peripherals on the nRF without implementing the Softdevice. 

  • Thats what I was led to believe (no Softdevice required), however when I Port over just the program .hex ---- its still asking me for which Softdevice is installed !   (need user input popup)

  • Which means the upload cancels.... (its still asking for Softdevice even though as you say one is not necessary)

Related