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

nRF52 hangs up when connected to app. With attached debugger it works perfect.

Hello i have a very strange behaviour of my custom nRF52832 board.

I use the latest SDK16 and at the moment the nRF-DK to flash and debug.

In normal (unconnected) operation everything works fine. But when i connect the device to our app it hangs up after a few seconds.
Only a hard reset will recover it.

The problem, when i attach the debugger to figure out the issue everything works just perfect. That is very strange..

Is that any errata or known problem?

I use the internal lfclock, and use the reset pin as led output.
My project based on the buttonless dfu template example.

I hope there is help for my strange issue.

Thanks a lot.

Max

Parents
  • Hello,

    Have you tried to attach the debugger after it got stuck? You can do this with nrfjprog and read back the CPU registers to determine exactly where it hangs based on the program counter value. The command for reading registers is "nrfjprog --readregs"

    I use the internal lfclock, and use the reset pin as led output.

    Please double check that the UICR.PSEL[] registers at 0x10001200 and 0x10001204 are not set if you are using P0.21 as a GPIO (nrfjprog --memrd 0x10001200)

    Best regards,

    Vidar

Reply
  • Hello,

    Have you tried to attach the debugger after it got stuck? You can do this with nrfjprog and read back the CPU registers to determine exactly where it hangs based on the program counter value. The command for reading registers is "nrfjprog --readregs"

    I use the internal lfclock, and use the reset pin as led output.

    Please double check that the UICR.PSEL[] registers at 0x10001200 and 0x10001204 are not set if you are using P0.21 as a GPIO (nrfjprog --memrd 0x10001200)

    Best regards,

    Vidar

Children
Related