Custom board based on nrf5340 CLAA not working after flashing the application

Hi,

I designed a custom PCB with the nrf5340 CLAA chip and am testing out the board. I want to flash a simple project of lighting up the on-board LED (the LED is connected to P1.07 in my board design). In nrf connect SDK in VS Code, I was able to create a custom board for nrf5340 QKAA (I was told this is fine for CLAA too), add the GPIO pin P1.07 in the DeviceTree, build the project without errors and flash the code to my board via JLink successfully. However, the LED is not lighted up. When I tried to debug, the process always stops at the step “Starting target CPU…” and won’t let me proceed.

I also tried to control the LED directly using JLink.exe via command line (I am using a windows machine because I encountered more issues on mac). I could connect to the chip in JLink. However, I was not able to write the values directly to the registers to light up the LED either. I wrote the values but when I checked the memory at the address, it was still 0. I checked the soldering of my board physically and they are all connected. I measured RESET and Power and they are both around 3.3V. Is there anything that you think I should try to solve this issue? Is there anything specific I should do to flash the code for the first time? (E.g. the chip is initially locked/protected so we can’t write to its memory directly for the first time?) Any advice would be appreciated. Thanks!

  • Hi

    If it's a brand new/fresh SoC there shouldn't be any lock/protection on it, and flashing it should be pretty straight forward. What are you using to program it, an nRF53 DK or similar, or a J-Link debugger? Have you been able to flash a similar project onto a DK to test that the firmware works correctly there, or are you gunning straight for the custom board? Per the product specification there shouldn't be anything special about the P1.07, so it just seems the board hasn't been flashed correctly.

    You can try running an nrfjprog --recover command from the command line, but if you can't detect the board in the first place my guess is there's something wrong with the HW, so perhaps a HW review would be the first step here. You can either create a separate private ticket for that or we can make this ticket Private so you can share schematics and gerber files here.

    Best regards,

    Simon

  • Hi Simonr,

    Thanks for your reply. I am using a J-Link debugger to program it. I don't have a DK to test on so I directly program on my custom board. I am using the SDK v2.9.1 and the corresponding toolchain in nRF Connect SDK in VS Code to program the board. The build and flash process all showed successful message and did not get any errors.

    Actually, I can detect the board after plugging in the J-Link to my laptop. The power on the board is also measured to be 3.3V. 

    I will talk with my collaborators to see whether we can share our schematics and gerber files. Thanks!

    Best,

    Ke

Related