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

Load firmware mesh examples into PCA10056 using Segger Embedded

Hi,

I was trying some examples of the SDK 13 and 14 for keil but now I need to undestand how works the ble mesh.

I did the download of the SDK mesh, and there are only segger's project.

I am trying to do the load of the firmware (light switch client/server) to nordic board (NRF52840) and this examples works when I use the Debug >> Go options... The problem is that when I turn off the board and remove the usb cable, the firmware is not save in the board.

I wanna know how I can load the firmware (SDK mesh examples) using SEGGER, looks like the load button in the keil. Do I need a JLink programmer to do it?

I tried also to load the firmware by command line: nrfjprog --program <dir>/light_switch_client_nrf52840_xxAA_s140_5_0_0-3_alpha.hex (Using the SDK 14/13 examples it works) but using the hex files generated from SEGGER, doenst works.

Thanks

  • Hello,

    I tested the client example on the nRF52840, and it seems to work. Please be aware that the example prints the log on the RTT, and not the UART, but if you modify the example to turn on a led, you should see that it should run after turning off the device, and switch it back on.

    Please note that the mesh SDK is not yet adapted to the nRF52840, but some of the examples should work. Can you also try to press Build->Build and Run before unplugging the device. Have you modified anything in the example? Have you added a UART, for instance?

    Do you have any way to check that the application is not actually running when you turn it back on? Can you check the RTT log, using RTT Viewer from JLink?

    Best regards,

    Edvin

  • Hi Edvin,

    I am trying to create a mesh network. Actually I have two types of boards. (PCA10056 and PCA10040) booth has the NRF52(832/840).

    Please note that the mesh SDK is not yet adapted to the nRF52840

    Can you explain this? What adaptation are not done yet?

    Are there any date to finish these adaptations?

    Can i to test all the examples shared in the nrf5_SDK_for_Mesh_v1.0.0_src using these boards?

    Have you modified anything in the example?

    Now I am putting only log to undestand the code

    Have you added a UART, for instance?

    No, but I wanna do it in the future, to send JSON objects

    o you have any way to check that the application is not actually running when you turn it back on?

    I am testing the light switch example (1 client and 3 server)... I press Build and Run and after the play button. Works fine. This way I can see the log on output window of the segger, but when I turn off the boards all the leds of all boards are turn off and the button event doenst work. Looks like that the firmware is not save.

    This process using the Keil is very simple, I need only press the load button.

    Which example I can to test the mesh network using these boards?  (PCA10056 and PCA10040)

  • Hello,

    I am sorry. I looked in the SDK for Mesh v1.0.1. In that release, the s140 is not yet implemented, only the s132.

    In SDK for Mesh v 0.10.1-alpha we do have the example that you described in your first post, and it does not need any modification, and uses the s140 softdevice.

    As of the production release of the SDK for Mesh, I can't say anything more specific about a date for the release of the s140 (or s130) SoftDevice compatibility. If you need more specified information, you can try to contact our sales team here.

    If not modified, the example should still log some info. This is the log from the unmodified example:

    If your application uses UART (it does not use this in the light switch example unless you have added it), there might be some issues when you power up the board, and it can't detect a physical uart connection through the segger chip, or any other pins. As long as you have something connected to the UART that you initialize, it should not be a problem. This should not be the cause of your issue, if you have not added a UART in your implementation.

    Are you sure you are using the correct example for the nRF52840, the s140 example? Have you tried pressing "Build" --> "Build and Run" in Segger Embedded Studio, and see that the light (LED1) turns on then? If you turn the board off and on, does it not light up again? Note that I am only talking about one standalone nRF52840 DK running the light_switch_client_nrf52840_xxAA_s140_5_0_0-3_alpha.emProject example.

    If you also want to test with the PCA10040 (nRF52832), you should use the examples for the s130 softdevice.

    If it still does not work, what version of Segger Embedded Studio do you use?

    Best regards,

    Edvin

  • Hi Edvin,

    I still have the problem to load the firmware in the board using SEGGER.

    I am sorry. I looked in the SDK for Mesh v1.0.1. In that release, the s140 is not yet implemented, only the s132.

    Ok, now I am using the PCA10040

    If not modified, the example should still log some info. This is the log from the unmodified example:

    Yes! I can to run it and works! I didnt modify the example!

    his is the log from the unmodified example:

    But when I turn off and after turn on the boards, I dont can see this log, and the leds are turn off too. I can conclude that the firmware is not run.

    I read about it and saw that there are a problem in the provisioning in the MESH SDK.

    https://devzone.nordicsemi.com/f/nordic-q-a/29108/how-to-add-mesh-into-nrf5-sdk-v14-1-ble-application?ReplySortBy=CreatedDate&ReplySortOrder=Ascending

    "Permanent storage of provisioning and configuration is not stored on flash. After reboot, the device would require provisioning again. We are working to fix this. The reason is the flash management on 2 SDKs are not the same and can conflict."

    But I am not sure if this is my problem.

    Are you sure you are using the correct example for the nRF52840, the s140 example?

    Yes! I am using the follow project.

    When I use the PCA10056, I use the S140 project.

    Have you tried pressing "Build" --> "Build and Run" in Segger Embedded Studio, and see that the light (LED1) turns on then?

    Yes! As I said, in the first time I can to run the example normaly. The problem is when I turn off the boards, then the LEDs are turn off.

    If you turn the board off and on, does it not light up again?

    Exactly!

    what version of Segger Embedded Studio do you use?

    3.34

  • Hello Renato,

    If you are simply trying to learn/familiarize yourself with Bluetooth Mesh then I would suggest that you don't use any Mesh SDKs prior to v1.0.1. Many of the issues that you may 'discover' when using a prior Mesh SDK would have possibly been reported by other developers and fixed in the 1.0.1 version. Additionally, some of the functionality in the examples has been enhanced in the Mesh SDK v1.0.1 code drop.

    If you are looking to build for both the PCA10040 and PCA10056 boards, then simply download the Nordic Mesh SDK v1.0.1 from this link. I would then recommend that you follow the instructions in this post to get the Segger Embedded Studio (SES) project files for the PCA10056/NRF52840 board (look for the attached examples.zip file in Hung Bui's response). My understanding is that inclusion of the PCA10056 project files was simply an oversight when the v1.0.1 Mesh SDK was packaged so this step should not be required in future Mesh SDK code drops.

    Once you have both Mesh SDK v1.0.1 and the examples.zip file in place, then I would recommend that you erase all the boards you will be using via either the nrfjprog -s xxxxxxxxx --family nRF52 -e command or whatever your preference may be (the caveat here is that you erase all remnants of any previous mesh configuration data).

    From there, build and flash your boards with the relevant softdevice and example firmware (This step should be done automatically by SES when you select the Debug->Go or Target->Download... menu optons). Alternatively, you can also use nrfjprog to manually flash the softdevice and .hex files to your relevant boards (if nrfjprog is used, don't forget to issue the nrfjprog -s xxxxxxxxx --family nRF52 -r command after flashing the softdevice & hex files)

    If you still run into issues after following the above, then post back and we can try to help you further (at least knowing that you are running the latest Mesh SDK and examples)

    Regards,

Related