Debugging fails on nRF5340 after flashing firmware

Hello!

I have designed a custom board with the nRF5340, powered at 1.8V. I am able to program the chip successfully, but after the firmware is downloaded (Zephyr RTOS, programmed with Nordic SDK: v2.5.0, Toolchain: v2.5.0), the nRF5340 becomes unresponsive, and I can’t debug or reprogram it without doing a full chip erase. Once I erase the full chip , I am able to reprogram it, but debugging still fails with the following error:

"ERROR: Unexpected GDB output from command "-exec-next". Cannot find bounds of current function". 

I suspected that APPROTECT or SECUREAPPROTECT might be causing the issue, so I tried disabling them via the command line:


nrfjprog --memwr 0x00FF8000 --val 0x50FA50FA --snr 801050626
nrfjprog --memwr 0x00FF801C --val 0x50FA50FA --snr 801050626nrfjprog --memrd 0x00FF8000 --n 4 --snr 801050626
#output: 0x00FF8000: 50FA50FAnrfjprog --memrd 0x00FF801C --n 4 --snr 801050626
#output: 0x00FF801C: 50FA50FA

The UICR values confirm that both protections are disabled, but the issue persists. After programming, the chip locks up again and requires a full erase before I can flash it. Debugging continues to fail regardless.

Anyone have any ideas what might be causing this?

Cheers,

Parker

Parents
  • I would suggest you flash the image in the nRF5340 DK and see if you have similar issue. If you do have similar issue, then something is wrong with the image which might be making the boot process crash pretty early not giving the debugger enough time to plug and halt the CPU. 

    If you do not have the same issue on the DK, then there is something on your hardware that we need to look into. Check of you have selected all clocks configurations in the software to match your hardware.

Reply
  • I would suggest you flash the image in the nRF5340 DK and see if you have similar issue. If you do have similar issue, then something is wrong with the image which might be making the boot process crash pretty early not giving the debugger enough time to plug and halt the CPU. 

    If you do not have the same issue on the DK, then there is something on your hardware that we need to look into. Check of you have selected all clocks configurations in the software to match your hardware.

Children
No Data
Related