This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf52 consumes quite lot of power

Hi.

I'm little worried about our bt sensor power consumption.

We are using twi/i2c to communicate with sensors periodically. We are using app timer to trigger these events and with some sensors we use hw interrupt.

Anyho I observed that there's 4.3-5mA consumption going on pretty much no matter I do. I even made a build, where there's nothing else done than waiting for event:

void main (void) {
     for(;;) {
          // Enter System ON sleep mode
          __WFE();  
          // Make sure any pending events are cleared
          __SEV();
          __WFE();  
    }
}

Still the power consumption is quite large. I don't have uart tracing on in Makefile.

  #flags common to all targets
   CFLAGS  = -DNRF52
   CFLAGS += -DSOFTDEVICE_PRESENT
   CFLAGS += -DBOARD_PCA10040
   CFLAGS += -DNRF52_PAN_12
   CFLAGS += -DNRF52_PAN_15
   CFLAGS += -DNRF52_PAN_58
   CFLAGS += -DNRF52_PAN_55
   CFLAGS += -DNRF52_PAN_54
   CFLAGS += -DNRF52_PAN_31
   CFLAGS += -DNRF52_PAN_30
   CFLAGS += -DNRF52_PAN_51
   CFLAGS += -DNRF52_PAN_36
   CFLAGS += -DNRF52_PAN_53
   #CFLAGS += -DNRF_LOG_USES_UART=1
   CFLAGS += -DS132
   CFLAGS += -DCONFIG_GPIO_AS_PINRESET
   CFLAGS += -DBLE_STACK_SUPPORT_REQD
   CFLAGS += -DSWI_DISABLE0
   CFLAGS += -DNRF52_PAN_20
   CFLAGS += -DNRF52_PAN_64
   CFLAGS += -DNRF52_PAN_62
   CFLAGS += -DNRF52_PAN_63
   CFLAGS += -mcpu=cortex-m4
   CFLAGS += -mthumb -mabi=aapcs --std=gnu99
   CFLAGS += -Wall -O3 -g3
   CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
   # keep every function in separate section. This will allow linker to dump unused functions
   CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
   CFLAGS += -fno-builtin --short-enums 
   # keep every function in separate section. This will allow linker to dump unused functions
   LDFLAGS += -Xlinker -Map=$(LISTING_DIRECTORY)/$(OUTPUT_FILENAME).map
   LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
   LDFLAGS += -mcpu=cortex-m4
   LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
   # let linker to dump unused sections
   LDFLAGS += -Wl,--gc-sections
   # use newlib in nano version
   LDFLAGS += --specs=nano.specs -lc -lnosys

   # Assembler flags
   ASMFLAGS += -x assembler-with-cpp
   ASMFLAGS += -DNRF52
   ASMFLAGS += -DSOFTDEVICE_PRESENT
   ASMFLAGS += -DBOARD_PCA10040
   ASMFLAGS += -DNRF52_PAN_12
   ASMFLAGS += -DNRF52_PAN_15
   ASMFLAGS += -DNRF52_PAN_58
   ASMFLAGS += -DNRF52_PAN_55
   ASMFLAGS += -DNRF52_PAN_54
   ASMFLAGS += -DNRF52_PAN_31
   ASMFLAGS += -DNRF52_PAN_30
   ASMFLAGS += -DNRF52_PAN_51
   ASMFLAGS += -DNRF52_PAN_36
   ASMFLAGS += -DNRF52_PAN_53
   ASMFLAGS += -DNRF_LOG_USES_UART=1
   ASMFLAGS += -DS132
   ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
   ASMFLAGS += -DBLE_STACK_SUPPORT_REQD
   ASMFLAGS += -DSWI_DISABLE0
   ASMFLAGS += -DNRF52_PAN_20
   ASMFLAGS += -DNRF52_PAN_64
   ASMFLAGS += -DNRF52_PAN_62
   ASMFLAGS += -DNRF52_PAN_63

With this setup I can measure (from USB) 4.39mA consumption.

Ideas?

Build made with gcc, no peripherals attached to board (altough there has been before if that matters), I've run also the "nrfjprog -f nrf52 -p" to disable debug mode.

Parents
  • TWI is high power consumption peripheral due to its dependence on HFCLK. Please make sure that you disable TWI hadrware when you are not using it. Also I'd suggest going trough your code and checking what hardware has been enabled on init. I.e. it's common mistake to initialize UART and leave it running.

Reply
  • TWI is high power consumption peripheral due to its dependence on HFCLK. Please make sure that you disable TWI hadrware when you are not using it. Also I'd suggest going trough your code and checking what hardware has been enabled on init. I.e. it's common mistake to initialize UART and leave it running.

Children
No Data
Related