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

  • Then the above:

    After the programming I read the device like below:

  • Hello Di-sheng,

     

    When I program my pca10059, I get error below.Actually, I do not know if the PCA10059 have been programmed successfully

     The messages you get there saying that you it can't find the device will come unless the application uses the USB peripheral on the nRF52840 dongle.

    I don't know what your application does, or how it controls the LEDs, but remember that one of the application LEDs is the red one. Are you sure your application doesn't turn that on?

    What sort of light switch example do you refer to? Does it use the softdevice (and did you remember to program the softdevice?), or is it the Zigbee light switch?

    There are many possibilities for why you don't see any advertisements (if BLE). Perhaps the application crashes before it starts advertising? Do you use UART in your application? If so, have you grounded the RX pin?

  • Hi Edvin

    Thanks for you reply

    I connect my pca10059 to PC by USB, and I can program the example of blinky which is in  "\

    ..\nRF5_SDK_16.0.0_98a08e2\examples\peripheral\blinky\pca10059\mbr\ses"  to my  PCA10059  by the Programmer of nrRF Connect tools. I notice when I program blinky to PCA10059, I got same information, but  the blinky running well.

    I modify the example of light-switch's serve project which is for BT Mesh and it locat at "\..\nrf5_SDK_for_Mesh_v4.0.0_src\examples\light_switch\server" for making the code match PCA10059. 

    I total make below changing:

    1.  change to the "#define BUTTON_BOARD (define(Board_pca10059))" in simple.h file.

    2.  Insert the first piece of code from  here  to simple.c file, which is define a function for seting GPIO output 3.0V, I think.

    3.  Insert the second piece of code from  here  to  function "void hal_leds_init(void)" of simple.c, which call the function above.

    4. Before building, I follow the "nrf52840 Dongle Programming Tutorial" post, modify the option of the project like below:

           a: Code-->Preprocessor Definitions: BOARD_PCA10059

           b: Linker-->Section Placement Macros :   follow the "nrf52840 Dongle Programming Tutorial" post

    After all of modifying above, the code past building ,but it do not running .

    Is there something wrong in code modify or some setting wrong in tools or something wrong in programming process?

    Thanks,

    B,Rs,

    Di-sheng

  • Hi Edvin

    I just had a question. I was able to successfully program the BLINKY example for DONGLE and it worked fine, but I couldn't successfully get the server code for the light-switch example to run on DONGLE. Is this because the blinky example does not require a soft device and the server program does?

    If the answer is yes. I have few question below.

    1. After a project be built in Segger Embedded Stuido, the soft device, Whether the soft device has been added to HEX? Because when I program code to PCA10056 , it do not need a extra soft device's hex. So I think the soft device's hex have been add to the hex of project. Is it ture or not.

    2. I want program a HEX file of project which need soft device and be built in SES to Dongle by Programmer tools, whether a soft device's hex need.

    3. If I need add a soft device with project's hex ,when I program the dongle by Programmer tools, if I need merge them by mergehex tools or I just add the soft device's hex and project's hex to Programmer tools?

    Thanks,

    Dison 

  • If you usually use Segger Embedded Studio to program your DKs, the Softdevice is automatically added. If you go to your project settings in SES -> Debug -> Loader, you can see that it links the softdevice under "Additional Load File[0]".

    If you program using nRF Connect for Desktop -> Programmer, it doesn't automatically add the softdevice. 

    1: I think that answers question 1.

    2: Yes. You need to manually add the softdevice if your application requires it. And if it is an example from the Mesh SDK, it does indeed require the softdevice.

    3: Well, it is possible to merge the two hexfiles using the mergehex tool (part of nrfjprog / nRF Command Line Tools. command: "mergehex -m file1.hex file2.hex -o mergedhex.hex".

    Alternatively, just drag and drop the softdevice from the SDK into nRF programmer, together with your application file, and it will program both the application and the softdevice.

    The softdevice is located in: SDK16\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex (use the SDK that you use together with the mesh SDK to get the compatible softdevice version).

    Best regards,

    Edvin

Related