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

Blinky not working on custom nrf5340 board

Hi

Migrating from NCS1.3.1 to NCS1.4.1, the Blinky sample stops working on my custom nrf5340 board. No compile error, but not running. I also have a nRF5340PDK. Works fine on this! Note that Blinky also works fine on my custom board when using NCS1.3.1.

How can I debug this?

Since Blinky works fine with NCS1.3.1 and not with NCS1.4.1  it's no HW fail !?

But since Blinky works fine with both versions on the PDK, there's no SW fail !? 

note: initially I had this trouble: Case ID: 256874 https://devzone.nordicsemi.com/f/nordic-q-a/66280/blinky-non-secure-sample-not-running (maybe they are the same)

Parents
  • Hi!

    Which revision of the nRF5340 chip are you using for your HW? I'm asking this as we released revision 1 in december, which behaves a bit differently compared to the engineering samples. Anyway, if you have the oppertunity to step through the code in SES we could get some idea of what's actually happening. 

    Are you using a custom board file (.DTS) for your board? 

    As for the other issue I will talk with Håkon and see what his thoughts are. I guess it can be related to how the pin is configured in the code.

    Best regards,
    Carl Richard

  • I'm using the engineering version marked nRF5340 QKAAAE 1940AB. The DK has nRF5340 QKAAAE 1934AB

    I'm able to step thru code on both targets (PDK and Custom). The code on custom board never enters main loop. I can step to line 479 in init.c: switch_to_main_thread(prepare_multithreading()); But stepping further; the code loop thru fault_s.S (enters line80) and bak to line 479 in init.c.

    Using NCS 1.3.1 both targets are debugged ok. Starting in main(void) in main.c <- NO SPM

    Note: Trying to enable SPM in NCS 1.3.1, I get the following compile error:

    c:/nordicsdk/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a(fw_info.c.obj):(.firmware_info+0xc): undefined reference to `_fw_info_size'

    I'm using the same DTS for both boards -> identical code.

  • Hi again!

    I'm awaiting input from the developers on this now. In the meantime I wondered if you have gotten the custom board reviewed earlier? While I find it hard to believe the hardware to be an issue given that it worked for v1.3.1 it may be beneficial to have someone look over the design.

    In addition I want you to try to set the following configurations in the Blinky prj.conf:

    CONFIG_NRF5340_CPUAPP_ERRATUM19=n
    CONFIG_HW_STACK_PROTECTION=n

    Report back to me if that affects the behavior or not. Thanks!

    Best regards,
    Carl Richard

  • Hi

    The changes to prj.conf didn't make any difference.

    After reloading the Blinky Project doing 'Clean Build Directory' (SEGGER embed studio), the secure version is ok, but not the nonsecure. Same behaviour running west from CLI. Trying to debug, the program never enters the nonsecure main.

    Bård

  • Hi again!

    So it works on both boards for the secure version now? There is a known bug for non-secure applications for your chip version (nRF5340 QKAAAE 1940AB). Could you try to apply this pull request and see if that improves on the issue? 

    Best regards,
    Carl Richard

  • Hi

    It did solve the problem! Thank you, Carl Richard.  Now I'm able to run the ns version and debug it. Is this pull request included in newer versions of NCS? Or is it only needed because I'm running an old version of nRF5340?

    Bård

  • Hi again!

    Good to hear! I should have mentioned it earlier. This pull request is only relevant for your version of the nRF5340 as there were the some changes between the engineering versions that led to the issue. The pull request is currently merged to the master branch of NCS (1.4.99-dev1), and will be included in the next NCS release.

    The PDK is being deprecated for future versions of NCS (including the current master branch), so I would consider upgrading eventually.

    Best regards,
    Carl Richard

Reply
  • Hi again!

    Good to hear! I should have mentioned it earlier. This pull request is only relevant for your version of the nRF5340 as there were the some changes between the engineering versions that led to the issue. The pull request is currently merged to the master branch of NCS (1.4.99-dev1), and will be included in the next NCS release.

    The PDK is being deprecated for future versions of NCS (including the current master branch), so I would consider upgrading eventually.

    Best regards,
    Carl Richard

Children
No Data
Related