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

Intermittent device reset in modified ble_app_beacon example

I've been documenting this issue and asking questions here:

Intermittent device reset in modified ble_app_beacon example

Since I need to post a proprietary schematic, I made this private post to continue.

This project is a stripped down version of a product under development. It depends upon being able to change the contents of the advertising data whenever the board (a sensor) detects a new state.  The code as shown generally works but eventually the device resets. This could happen after running for a few minutes or a few days or anywhere in between.

UPDATE:

I've removed the schematic and am now making this post public.

SUMMARY:

  • Verified the resets are not caused by software by examining the RESETREAS register after a reset occurrs.
  • Learned the NRF52 processors will reset if the supply voltage rises 0.3v at or above a rate of 1mV/mS.
  • Verified the ripple on Vdd was within tolerance. Eliminate brown-out reset as a cause.
  • Verified no reset happens when running off a power supply instead of a coin cell (CR2477)
  • Eliminate battery connection as a cause
  • Suspect the battery brand, test another brand, still got resets.
  • Build and use a current to voltage amp to accurately measure peak battery current
  • Eliminate peak current as a cause
  • Measure battery current while programming the device and discover programmer is sending current into the battery.
  • Configure programmer to not send power to the device
  • Retest 12 devices with fresh batteries.

At this point I am gaining confidence that the programmer was damaging the coin cells with the reverse current. I've appealed to Nordic to document this in the DK user guide and am converting this post to public in case they don't.

  • Here is th epeak current with the Sky chip active during Tx: ~6mA

  • For reference, here is what it looks like with the 680uF cap removed.  I had to use a smaller shunt resistor (0.333 ohm) to capture this so the peak current is 14./2000/0.333 = 22mA. The average is 662uA.

  • Sigurd,

    All this focus on battery current got me thinking along these lines: Something is damaging the battery. There is no way so many cells from multiple brands of battery could be exhibiting this effect on their own. This lead me to measure the battery voltage  while the sensor was connected to the programmer (the DK).

    I found there was a negative current to the battery up to 1mA in some cases. This has to be the explanation. In further reading about coin cells I found they are very sensitive to reverse currents and, obviously are not meant to be recharged.

    To test the theory I programed 12 sensors and quickly put in fresh PKCell batteries after disconnecting the programmer.  Since te sensors has enough capacitance to run for several seconds without power, the processor kept running and the programmed time stayed correct.

    So far, after two and a half days, there have been no resets and battery voltages are holding up better than before. So far so good.

    Way back when I started this project (over a year ago) I searched the Nordic documentation for how to set up the DK to program an external board.  I could not find any official instructions for this. but I did find this diagram in a forum post:

    So I tried it and it worked.  I tried searching the infocenter again just now.  I can't find anything on how to do this or even any explanation of VTG, etc. 

    After reading a bunch of different posts, I think this is what I need inorder to program the sensor with the battery in place:

    Can you confirm?

    Please document this and make it easy to find.

  • Very good find with the reverse current.

    brian said:
    Can you confirm?

     Yes. If you are already powering the device, e.g. with a battery, you should not connect VDD from the DK to the sensor-device. And in that case, I don't think you need/should connect GND from the DK to the sensor-device either, but connect GND from sensor-device to GND DETECT instead.

  • First, I tried GND DETECT but then it wouldn't program. When I changed to GND as above then it worked.

    Is this documented somewhere?

Related