10 years ago.

How to put nrf51822-mkit in low power consumption

I've tried adding in the examples the:

sd_app_evt_wait();

(including #include "nrf_soc.h" and #include "nrf_sdm.h")

Disabling led, etc. And power doesn't go under 1,2mA.

What else is needed? Is there any else up and running (i.e. ADC, Uart ) what needs to be disabled?

Best regards. (sorry for asking out of nrf51822 forum, I don't know how to change an already created question to a specific board)

Question relating to:

The nRF51822-mKIT is a low cost ARM mbed enabled development board for Bluetooth® Smart designs with the nRF51822 SoC. The kit gives access to all GPIO pins via pin headers …

The debugging portion of the SoC is likely still running (it consumes 1mA). Try resetting the SoC, and it should be disabled. For production programming, you can set a flag in NRFPROG to disable it. Hope that helps let me know if it worked?

-marc

posted by Marc Nicholas 26 Apr 2014

2 Answers

9 years, 12 months ago.

The debugging portion of the SoC is likely still running (it consumes 1mA). Try resetting the SoC, and it should be disabled. For production programming, you can set a flag in NRFPROG to disable it. Hope that helps let me know if it worked?

-marc

I've tested resetting without improvement in power consumption. What else can be done? I'm testing with: sd_softdevice_enable( NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false ) without sucess.

posted by Angel Maza 26 Apr 2014
9 years, 12 months ago.

What is the clock source of the nrf? and at what clock speed is it really clocked at?

I'm not sure. I use the heart rate by example. Includes nRF51822n.h, creates nRF51822n nrf;

and later calls init ble_error_t nRF51822n::init(void) { /* ToDo: Clear memory contents, reset the SD, etc. */ btle_init();

return BLE_ERROR_NONE; }

in btle_init: error_t btle_init(void) { APP_TIMER_INIT(0, 8, 5, false); SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);

ASSERT_STATUS( softdevice_ble_evt_handler_set(btle_handler) ); ASSERT_STATUS( softdevice_sys_evt_handler_set(sys_evt_dispatch) );

bond_manager_init(); btle_gap_init();

return ERROR_NONE; }

Calls SOFTDEVICE_HANDLER_INIT that uses external xtal. So I assume that uses external LFCLK (32768 xtal).

I add a for(;;) { sd_app_evt_wait(); } for entering low power mode. Power decreases to under 1mA (0.7-0.8) but doesn't go to expedted uA...

posted by Angel Maza 29 Apr 2014

To get to that lower level uA level,(1) you need to first run off a slow frequency level that is at the same time efficient but minimal to run the BLE stack and radio all fine(I mean not at like 1mhz there maybe problems with radio communication because I have seen RFMB radios not working if made working super slow at 1mhz as the communication gets so slow that it kills the SPI calls) and (2) then also shut down the not in need peripherals like the ADC, UART and etc unneed peripherals and if some of these peripherals are needed just use them and switch them off when used! and then (3) SLEEP you uC ,now it necessarily means powering the complete uC down and using interrupts to wake from sleep.

posted by Nishant Sood 29 Apr 2014

Thanks for your reply.

I think that something prevents stay in LF clock. I put in the while(1) a gpio on/off and I see the led blinking 5-10 times/second. When calling sd_app_evt_wait() mcu must enter in low power at 32768Hz until a event wakes the mcu.

I've seen in project_config.h

  1. define CFG_DEBUG (2) And changed to
  2. define CFG_DEBUG (0)

But nothing improves. After resetting power remains in 0.8mA. Something isn't working ok, I see n/a as the devicename instead of mbed. Can be related? Is the softdevice started ok?

posted by Angel Maza 06 May 2014