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

NRF52 doesn't work after a few days

I'm getting a weird behaviour on my first NRF52 custom board. It's a BLE with HR, battery and a custom service. After programming I can test it properly with/without debugger and powered either by FTDI + Regulator or a battery.

For 2 times now the system just stops working, not even with BLE detected by PC or Android phone (connection with both worked before). After reprogramming the exact same software, everything goes back to normal.

I was thinking about putting a software UART (the hardware one is already taken) to have some feedback, but maybe there are other alternatives. Can I create a debug session on a already running device, without reprogramming it?

Did you ever had such problem? What could be wrong to make this happen and what methods can I use to diagnose it?

  • You can attach a debugger to a running chip, halt it and read the registers. Literally do exactly that, attach a debugger (JLink recommended), I'd use the command line to halt it and read the registers. Most IDEs will try hard to reset and reprogram so they won't work well. If you try Segger's excellent Ozone debugger I think you may be able to point it to the software image, attach it and get a full debugger at the point you've halted. Try it on a running chip, it's a nice tool.

    Note that as soon as you do attach a debugger, you can't single step (well you can if you use the debugger to instantly disable all interrupts to stop the softdevice getting any). So you really just have a frozen 'moment in time' to work from, but that may be enough.

  • I had a similar issue. If your problem is recurrent (undoubtedly the BLE will froze) you could let the board running connected to the debugger, with a breakpoint on app_error_handler_bare and first lines of main. If, for some reason, your firmware is glitched you would trap the code before it reboots and use stacktrace to check from where is coming the error.

    I've done such using a custom board attached to the Nordic nrf52DK and eclipse as IDE. solved my problems.

  • Not working you mean not advertising ? If that is the case, check the advertising timeout.  Set it to 0 for non stop advertising otherwise it will stop at timet out.  The default was usually 180 seconds.

Related