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

LED3 does not light up after programming ZigBee's network_coordinator to nRf5340 DK

Hello,

I'm a CS student and I'm trying to work with nRF5340 DK. I'm trying to program the sample network_coordinator (Zigbee) to the board using  SEGGER Embedded Studio, through nRF Connect SDK v1.5.0. When I build and Run the program, I get a "Project out of date warning", which I click "No" on and then SES said that everything is successful. But when I look at the board, LED3 is not turned on, and even after I press Button1 to re-open the network, LED3 still does not turn on. I've been trying to follow the instructions for the sample, but I still cannot figure out the problem. It's my first time working with NCS and nRF5340 DK so I'm pretty sure I'm missing something simple. I hope that I can get som help here. 

Best Regards

  • Hi,

    Have you tried following the step in the nRF Connect SDK tutorials for nRF52840? -> https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial
    In which step of the process are you having problems?

    But when I look at the board, LED3 is not turned on, and even after I press Button1 to re-open the network, LED3 still does not turn on. I've been trying to follow the instructions for the sample, but I still cannot figure out the problem

    It doesn't seem like the example is flashed correctly to the board.


    Best regards,

    Marjeris

     

  • Hello, thanks for the reply, 

    Yes, I have followed the steps in the tutorial that you have linked. I've successfully done all the parts of the tutorial except the last part where they use a sensor. 

    I've followed the tutorials' Build and flash example where I Build and Run in SES. How do I know if the program has been flashed correctly or not?

    Best Regards. 

  • Hi,

    A "Project out of date" warning indicates that the project has not been built after changes have been made, or that it needs to be rebuilt. Could you try to build with Build > Build Solution and then program it to your device with Target Download zephyr/merged.hex? Please also check the output terminal in SES when building to see if you get any warnings or errors.

    Did you select the correct build target when opening the project, nrf5340dk_nrf5340_cpuapp?

    The nRF5340 has two cores, the application core and the network core. When building Zigbee samples for nRF5340 DK the nRF IEEE 802.15.4: Serialization RPMsg sample has to be programmed on the network core. However, this should happen automatically in the Zigbee examples in NCS, with it being added as a child image in the nrf5340_dk_nrf5340_cpunet core when building the main application (the network coordinator sample in this case), and building and programming the two as a multi-image build. When this happens, the configuration CONFIG_NRF_802154_SER_HOST shall be automatically set. You should not have to do any additional steps in order for the network core to be programmed. However, you can still check if CONFIG_NRF_802154_SER_HOST has been set to make sure the sample was built correctly, as without this, the radio will not work. You can find this in your build directory, in /network_coordinator/<build_directory>/zephyr/.config. Open the .config file and search for CONFIG_NRF_802154_SER_HOST. It should be set to y.

    Another thing you can do is to see the log of your device in a terminal emulator, such as Termite or PuTTY. The log level should be set to info by default, but you can change this in prj.conf if you want to. Please make sure to reset your device in order to get log from the beginning. For more information about this you can check out How to connect with PuTTY (you can also use other terminal emulators, PuTTY is just used as an example), Logging in nRF Connect SDK and this link about custom logging per module in Zigbee.

    You can also read about building and programming samples for nRF5340 specifically here.

    Best regards,

    Marte

  • Hello, thank you for the reply.

    - I've done as you have explained:
    "Build > Build Solution and then program it to your device with Target Download zephyr/merged.hex"

    However, it is still the same. Is it correct that I am suppose to click on "No" when a "Project out of date" warning pops up?
    There are also no warnings or errors in the output terminal after finishing the process mentioned above. 

    - Yes, i have chosen "nrf5340dk_nrf5340_cpuapp" as the target. 

    - I've also tried to program " 802154_rpmsg " into the nrf5340_dk_nrf5340_cpunet core and got this in the output terminal:

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    ResetTarget() start
    ResetTarget() end
    Downloading ‘zephyr.elf’ to J-Link
    Programming 60.6 KB of addresses 01000000 — 0100f2b7
    Programming 0.6 KB of addresses 0100f2b8 — 0100f563
    J-Link: Flash download: Bank 1 @ 0x01000000: 1 range affected (65536 bytes)
    J-Link: Flash download: Total: 0.911s (Prepare: 0.038s, Compare: 0.042s, Erase: 0.000s, Program & Verify: 0.821s, Restore: 0.008s)
    J-Link: Flash download: Program & Verify speed: 77 KB/s
    Download successful
    Illegal value 0x21005C90 written to register 66 (MSP_NS) ignored

    I also checked CONFIG_NRF_802154_SER_HOST in "/network_coordinator/<build_directory>/zephyr/.config." which has already been set to y.

    - I've also tried using PuTTY, but it does not seem to help me figure out what the problem is. 

    - I have also tried program "light_bulb" to two  nRF5340DK boards: 

    Board 1:
    LED 1 Blinking
    LED 4 ON

    Board 2:
    LED 1 ON
    LED 4 OFF

    I don't understand why even though I programmed the same program, it shows different interface. Even though the first program on the board (push button1, Led1 turns on; push button2, led2 turns on, and so on) works. I try to program "network_coordinator again, to both board 1 and 2. LED 3 is still not turned on (even after pushing Button 3). 

    Best Regards

  • Hi,

    michey said:
    Is it correct that I am suppose to click on "No" when a "Project out of date" warning pops up?

     Clicking yes will just build the project. If you have built the project successfully and you have made no changes to the project or the build folder since, then this warning should not appear. Since it still shows up, it could be a bug. I have seen someone mention getting this dialog when they moved the project out of its example folder, but I cannot say for sure what the reason for this is if still get it after building. Since you are experiencing problems getting the sample to work, you can try to click yes when this appears, to make sure the build is not out of date.

    Since CONFIG_NRF_802154_SER_HOST  is set to y, then the sample for the network core should have been added successfully, so you do not have to program it individually. You can also see that the nRF IEEE 802.15.4: Serialization RPMsg sample is added by looking at the build transcript output in the terminal in SES, where there should be mentions of building 802154_rpmsg_subimage. Please be aware that programming a sample to the network core is not as straightforward as the application core.

    michey said:
    I've also tried using PuTTY, but it does not seem to help me figure out what the problem is.

     Could you please share the log here so I can see? Please also set CONFIG_LOG_DEFAULT_LEVEL=3 in prj.conf to get more logs.

    michey said:
    I have also tried program "light_bulb" to two  nRF5340DK boards: 

     LED 4 is merely the light bulb which is to be controlled by a light switch, so whether this is on or off should not matter that much, as long as the sample works as expected, i.e. that you are able to control the light with a light switch.

    Without logs from the network coordinator it is hard to say what the problem is. Is the device still able to create the Zigbee network, and to have it open so that other devices can join? Are you able to join the network with other Zigbee devices? You can test by programming the light bulb or light switch sample to another DK and test as described in the documentation for the samples. LED 3 on the bulb and switch is used to indicate that the device is connected to a network. You can also see this from the log.

    Are you only experiencing issues with the Zigbee samples on nRF5340 DK, or are you experiencing problems with other samples as well?

    Best regards,

    Marte

Related