nRF52840 high sleep current with sawtooth waveform

I've got a project based on NCS v2.6.0 using a nRF52840 as contained in a Fanstel BT840F module.

With help from you all (thank you!), the software works. Bluetooth and PWM and NVS are all working fine.

I'm trying to wrap this up at the power estimating phase, and I'm seeing something I need more help with.

In the previous version of this project, as we were delivering prototypes, 22 out of the 25 initial units exhibited the expected low 8uA average current, but some exhibited on the order of 700uA.  Since we had our required yield in hand, we did not pursue it.

In the current version, which differs only slightly from the previous (LEDs driven through MOSFETs instead of directly from the GPIO, a beeper driven via PWM through a MOSFET), almost all of them show 700-ish microamps.  I've got one that starts off working right (8uA), but if I cycle power with less than a few seconds of off-time, probably not enough for the capacitors to discharge, it comes back up in the 700-ish mode.  I've got another that starts off working right, but if I turn it off for less than _minutes_ and turn it back on, it comes up in the 700-ish mode.

Since we can't make our yield, I'm investigating.  What I see is that when it is working right, I get a nice supply current waveform with small spikies (this is zoomed into the quiescent region between radio bursts, when the chip should be asleep except for OS-driven timekeeping):

When it is working wrong, I get a supply current waveform with a sawtooth pattern, around 150uA peak-to-peak and average 700-ish uA.  The frequency varies somewhat from unit to unit, but its around 20KHz.

The BT840 module is strapped for Normal Voltage (VDD connected to VDDH), and there's 21.1uF bulk capacitance on the external supply line.  I don't know what's inside the module (other than the datasheet says the DC/DC is ready for service with an internal inductor) and I can't probe on anything useful.

It's not at all clear that my software or configuration settings could be responsible for a phenomenon that happens on some units and not others, and will show up on even "good" units.  Plus, I don't see this if I load the software on a nRF52840DK hacked for current measurement through P22.

Probably not related, but I observe something else:  When running the SW on the DK, the current spikes that indicate processor activity occur at 1 millisecond intervals.  Sure looks like a "tick" to me.  Same software running on our target hardware (the occasionally good ones) has an interval around 15ms that varies from unit to unit.  And yet they communicate just fine and the LED blinks at the expected interval.

Note that on "bad" units that always exhibit the 700-ish uA current draw, the software works fine.  The LED blinks at the expected interval.  BLE connects and stays connected with the Central.

Related