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

nRF52 low power current consumption

Hello everyone,

I am currently using a nRF52832. I've been trying to use the low power mode with little success. I have been seeing a current draw of about 3.5mA. I would expect to see number much lower than this. If i turn on SYSTEMOFF, the current draw can flow as low as 2uA. I thought there could have been an issue with some of the peripherals i was using, so i removed everything from the code apart from the code to put it into low power with an infinite for loop after. Nothing changed.

I am not using the softdevice.

Any suggestions how to get better current consumption?

The I'm using is below.

void main(void)
{ 

   static const uint32_t RAM_BLOCK_OFF = 0UL;
   static const uint8_t NUM_RAM_BLOCKS = 8U;


   /* ALlow memory to turn off to save power */   
   for(uint8_t i = 0U; i < NUM_RAM_BLOCKS; i++)
   {
      /* [15] POWER: RAM[x].POWERSET/CLR read as zero */
      NRF_POWER->RAM[i].POWERSET = RAM_BLOCK_OFF;
   }

   /* I thought I'd try calling the old functions to turn the ram of to see if anything happened. */
   NRF_POWER->RAMON = RAM_BLOCK_OFF;
   NRF_POWER->RAMONB = RAM_BLOCK_OFF;

  NRF_POWER->DCDCEN = 0U;
   
  NRF_CLOCK->TASKS_HFCLKSTART = (uint32_t)0U;
  NRF_CLOCK->TASKS_HFCLKSTOP = (uint32_t)1U;
  NRF_CLOCK->EVENTS_HFCLKSTARTED = 0u;
  __DSB();
  while (NRF_CLOCK->EVENTS_HFCLKSTARTED != 0){}
  
  NRF_POWER->TASKS_CONSTLAT = 0;
  NRF_POWER->TASKS_LOWPWR = 1u;
  __DSB();

  for(;;){}

}

Thanks, James

Parents Reply Children
No Data
Related