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
  • Thank you for your response, Susheel.
    The firmware is working well on the nRF5340 DK. The issue appears to be specific to my custom hardware. I based my design on the nrf5340_claa_config4 reference from the nrf5340-xxaa-reference-layout-1_2.zip.
    I would appreciate your help in debugging this issue.

  • Sorry for late response Parker, If you have used the reference layout as is then it should have worked since thousands of other designs are using the same reference layout and have been successfully working with the development of their custom boards. If there are any modifications (however minor) it would help if you could upload your schematics and layout files here and in short write to us what difference you made on your custom board with respect to the reference design and we can do a review of your design. 

Reply
  • Sorry for late response Parker, If you have used the reference layout as is then it should have worked since thousands of other designs are using the same reference layout and have been successfully working with the development of their custom boards. If there are any modifications (however minor) it would help if you could upload your schematics and layout files here and in short write to us what difference you made on your custom board with respect to the reference design and we can do a review of your design. 

Children
No Data
Related