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

Program nrf52840 dongle failed

Hi Nordic team

I have successfully programmed my PCA10056 for example light-switch and they running well. Right now I wang program my PCA10059 for a server of example light-switch. But it failed, although I can programmed PCA10059 by  a blink example for PCA10059.

The server code of light-switch example have been modified to match the PCA10059  (account to the way from here) and set up my Segger Embedded Stuido like here. the project have been built successfully.

When I program my pca10059, I get error below.Actually, I do not know if the PCA10059 have been programmed successfully.After the programming ,The PCA10059 disconnect with PC and do not do anything untill it be reset again and go a state which  red led flash.  It is quite clear that the server code do not running.

Is there some one can help me to solute them.

Thanks,

B,Rs,

Di-sheng

  • Hi Edvin

    Thanks for your reply, It is very good for me.

    From your reply, I have some understanding, you can see if it is right.

    1. There are no soft devices code in the hex file generated by SES for the building of the project

    2. The addition of soft devices is a simple merge. The address of the soft device is an absolute address, so SES will replace the calling address of the soft device in the project with some absolute addresses for the building of the project.

    However, my situation today when I merge the hex file for the application project and hex for the soft device did not seem to support my understanding.

    Below is the problem I encountered when attempting to add soft devices.

    1. Use mergehex command to merge the "s140_nrf52_7.0.1_softdevice.hex" and "light_switch_server_nrf52840_xxAA_s140_7.0.1.hex" which is modified for PCA10059.

    The result showed me they are conflict.

    2. Use Programmer to add 2 hex files for flashing chips

    The result is same. The black bar shows that the two hex files do overlap.

    I have a few questions below about this outcome.

    Q1: Since SES did not add soft devices to the project building (because the soft device is added after project building), how did the project be compiled and linked?

    Q2: Why can SES add hex of soft equipment to hex of the project without conflict, and write it correctly to PCA10056? But I use SES of the same environment (in SES, I have made corresponding changes to the project Settings, see the last reply) and hex of the project building has conflict with the soft  device.

    Q3: What should I do to resolve this conflict?

    Q4: When I used the bluetooth Mesh, I found two soft device files, one in the nRF5_SDK_16.0.0 (nRF5_SDK_16.0.0_98a08e2.zip\components\softdevice\s140) and the other in the nRF5_SDK_for_Mesh_v4.0.0_src(nrf5_SDK_for_Mesh_v4.0.0_src.zip\bin\softdevice), are they the same?

    Thanks,

    B,Rs

    Di-sheng

     

  • A1. The softdevice is a precompiled binary, so it doesn't need to be linked to the application. It is the header files for the softdevice that you have included in your application that tells the application what to do with calls to the softdevice (SVCALL).

    A2. You probably have something wrong in your flash settings in your application for the nRF52840 dongle. Please compare the flash settings for pca10056 and 10059:

    A3. See A2.

    A4. Good point, I didn't realize that the Mesh SDK contained so many versions of the softdevice. You would want to use the same version as you use in the pca10056 application, which looks like it is 7.0.1 version of S140. Use the same version in your pca10059 project (when you program using nRF Connect->Programmer.

  • Hi Edvin

    It works.

    For this reason, as you remind me, I should not blindly follow the Dongle tutorial to modify " Linker-->Section Placement Macros ". When I change it back, every thing works.

    Thanks,

    B.Rs,

    Di-sheng

Related