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

nrf52 hangs in softdevice on power up

Hi, I am running an nrf52 (board PTR5628, no external 32kHz crystal), having some leds blinking at startup just prior to start advertising. 75% of the time when I power it on it hangs. If I connect a debugger it seems to be stuck at address 0x8e4 - softdev s132_nrf52_3.1.0.

The interesting part is that if I have the SWDIO and SWDCLK pins connected to a debugger (running or not running), it starts ok 100%. I was under the impression these pins could be left unconnected? Pulling them to low does not affect bad behaviour. Pulling high is still untested.

Thanks!

  • Hi again,

    solved it. Turns out that it was a non-connected debug uart port freaking out. When setting the uart pins to UART_PIN_DISCONNECTED it worked also with the SWD detached. God knows why. My guess is that the uart RX pin fluctuated without the ground from the SWD. This is turn probably generated lot of input to the nrf52. As I based my app on the BLE-UART example, this might have generated calls into the softdevice stack way too early, or spammed it enough to kill my app. As things work when I debug, it is somewhat hard ever figuring out what actually messed things up.

    Anyhow, nrf52 rock! Way to go Nordic! Easiest the most competitive sdk and chip when it comes to CortexM4 with integrated 2.4GHz radio. No forcing of toolchain vendors or operating systems.

    Cheers!

Related