I have a small project on a custom board using an nRF51824 processor.
The code basically initializes the BLE stack timer and GPIO and then falls into a loop
while (true) sd_app_evt_wait();
The timer (using RTC) fires every 5 seconds to kick the watchdog and check for a connect timeout condition (15 minutes).
When I connect I'm responding to one of a half dozen commands.
While advertising for a connection I see the board draw 0.92 - 0.97 milliamps. When connected I draw 1.01 - 1.10 milliamps.
Whether connected or not, 99.99% of the time my application is not doing anything other than sleeping.
What I'd like to do is reduce the power draw when advertising and connected as much as possible.
My advertising interval is 250ms.
Thoughts where I should look?
The device should not consume this much with the code you describe. You may have the chip in debug mode, as the nRF51 consumes about 1 mA when debug mode is enabled. Do you have a debugger connected to the device when you do current measurements? If so, try disconnecting it before you do current measurements. Does current consumption come down when you do?
The nRF51 series current consumption guide has a good overview of what you should do to reduce current consumption of your nRF51 device.
No debugger attached. I"ll dig into the current consumption guide.
Just a few more comments on the debug mode. The nRF51 can enter debug mode if there is noise on the SWD CLK pad, as the internal pull-down is quite weak. Do you have the recommended external 1k pull-down on the SWDCLK board from the reference layout? If not, noise picked up on the SWDCLK line could put the device in debug mode even if no debugger is connected. This is particularly the case if you have long SWDCLK lines. A last point is that you need to power cycle the board after disconnecting the debugger in order to make sure the device is not in debug mode.
Another point is that you should verify whether the current consumption is actually caused by the nRF or by some other devices on the board. (LED's, other IC's, pull resistors etc.).
The link you provided has links to "system on mode example" and "system off mode example". But they are dead links. Can you point me at a good link for these. Or the example in the 10.0.0.0 SDK.
I will ask the HW engineer about the resistor. There is no debugger attached to the device - I'm using DFU to update code and power cycling the device afterwards. Is there a way for software to tell if the device is in debug mode and take it out of debug mode?