Blinky LED fails to run on nRF5340 DK dev kit

I am trying to assess the nRF5340 on its DK dev kit (PCA10095) and considered flashing a LED the simplest first step to check the development tools and the debugger.   Despite the simplicity of the idea, I never see any LEDs flashing.

I used the NRFconnect for within VSCode to create a new application and base it on the blink sample already available.

I set the board to be nRF5340 and be optimised for debugging in the Build configuration.

     

When the application is built it takes a while but it reports two problems:

I assume the second isnt a serious problem given its blue (i) icon next to it, but the first is more concerning. 

If I use nRF KConfig GUI to enable this 'coredump' feature, even when I have enabled this error still persists and this maybe due to not all the Kconfig entries being filled in correctly

Q what should these entries marked "(empty)" be entered as?

Curiously despite these 'problems' with the build it is still possible to flash something onto the nRF5340DK which gets stuck calling arch_irq_lock() 

  

In the meantime I will keep trying things to get this simple code to work, but its surprising something so simple wont work on a dev kit 

Parents
  • Update:  I have tried to recreate this issue and noticed there are two blinky examples on my HDD and the second demonstrates the failure above but the first does not and will flash a a real LED on the target Dev Kit.

    Superficially this is problem solved, but it was a 50/50 chance I pick the working sample.

    I did successfully build and run the third sample seen above which uses a PWM pattern to flash the LED.

  • Hi,

    The samples under nrf are officially supported in the SDK. The sampls under zephyr come from vanilla Zephyr and often works, but are not officially supported in the nRF Connect SDK (they will often be usefull, but may not always work as they are not officially supported or tested during SDK releases). See Samples.

Reply Children
  • Hi Einar,  I will avoid testing any of the Zephyr sample code for the moment.

    As a sanity check I tried to repeat the blinky example described at  

    Exercise 2 - Build and flash your first nRF Connect SDK application - Nordic Developer Academy

    and after creating a new application based on the nrf samples, I made a new build configuration following the instructions, targeted a "nrf5340_audio_dk/nrf5340/cpuapp/ns" and the build reported success after several minutes:

    I then tried flashing this back into the nRF5340 which also reported success

    The big problem is this time I dont see any LEDs actually flashing on the PCB. Confused

    Given I repeated the DevZone example this is worrying, so I thought maybe build a debug optimised version of this sample and step through the code with breakpoints to check the code is running on the target cpu. The build stage reports success and flashing also reported success:

      

    Attaching the debugger to the target appears to be ok but still no evidence of LEDs flashing Confused

    It appears the code is doing nothing more than constantly calling k_cpu_idle() from the source file "c:\ncs\v3.0.2\zephyr\kernel\idle.c" with no evidence of any code that turns the LED on or off which explains why I dont see this.  

    Something is clearly fundamentally very wrong Confused

  • Hi,

    Is it so that you built for nrf5340_audio_dk/nrf5340/cpuapp/ns but are testing on a nRF5340 DK? If so, this will not work as these are different boards which does not have LEDs on the same pins. Wiht the nRF52840 DK, you should build for nrf5340dk/nrf5340/cpuapp (or nrf5340dk/nrf5340/cpuapp/ns but I would avoid that for not for simplicity and to reduce build time as you probably do no need TF-M at this stage).

Related