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

How to get low current consumption nrf52840

HI

I am using this sequence functions in  my main loop for low current consumption

__SEV();  __WFE(); __WFE(); 

normally I have 13mA  in my application  when I am using those functions my current is 7.8 mA

but the velocity process get down in my main loop , using 

__SEV();  __WFE(); __WFE(); 

 for (;;)//main loop
    {
			 
          __SEV();  __WFE(); __WFE(); 
			
			caida_init();
			idle_state_handle();
			turnOnLed();
    }
  

how can I to fix that?, 

or what can I use to replace it?

is the RTOS a possible solution?

thanks and reagrds

Parents
  • Hi there,

    7 mA in sleep is a lot. Are you using a custom board or a development kit? There is no need to call __SEV(), WFE(), WFE() and idle_state_handle() as they effectively do the same.

    regards

    Jared 

  • HI Jared

    Not really, I am using a generic module (BAST), the 7mA  is current from ICM-20948(gyroscope and accelerometer) then 0.8 to 1mA is possibly of module , i am no sure. 

    I am using different sensor devices , SSD1306(spi), MAX30101(I2C),ICM20948(I2C), 

    ICM20948 and BLE is always turn on,  normally ssd1306 and max30101 is shutdown,    

    if i dont use  __SEV(), WFE(), WFE(); the consumption is 13 mA with the module and ICM20948 turn on , then i have no idea why , in my application i need the ICM always turn on,

    I saw this guide "current consumption guide" but I don't have results 

    do you have other guide ? or example ?

    thanks and regards  

  • Hi,

    The ble_app_uart example has not been power optimized. If you want to decrease current consumption, then you can adjust the advertising parameters such as the increasing the advertising interval and decreasing the TX power, you could also turn off the logger module. Here is a thread that sum up some suggestions for decreasing the current consumption for the ble_app_uart example. 

    regards

    Jared 

  • HI,

    Aah ok,  you right, I disabled  uart, from sdk_config, And now I have low  consumption, 

    but sometimes i have a error when i am using this, "snprintf" 

    memset(printf_buffer, 0x00, sizeof(printf_buffer));
    snprintf(printf_buffer, 10, "E1");
    length = strlen(printf_buffer);
    uint32_t err_code = ble_nus_data_send(&m_nus, (uint8_t *)printf_buffer, &length, m_conn_handle);

    thanks for your help 

    regards 

  • Hi,

    Could you specify what error you get? It would be great if you could share the error log? 

    regards

    Jared 

  • Hello

    yes, sure 

    when I comment uart_init in my application, don't works , but dont shows a specific error

     sdk_config is disabled uarte, and i dont have a problem abaut this

    but if is diabled this app_uart_enable

    shows this

    linking...
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from main.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol app_uart_put (referred from main.o).
    Not enough information to list image symbols.
    Not enough information to list load addresses in the image map.
    Finished: 2 information, 0 warning and 2 error messages.
    ".\_build\nrf52840_xxaa.axf" - 2 Error(s), 6 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:52

    i comented all about uart_init


    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from retarget.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol app_uart_put (referred from retarget.o).
    Not enough information to list image symbols.
    Not enough information to list load addresses in the image map.
    Finished: 2 information, 0 warning and 2 error messages.
    ".\_build\nrf52840_xxaa.axf" - 2 Error(s), 3 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:03

    i need to send and receive data over NUS, thats why  im using ble_uart example , but dont use the serial port tx/rx 

    im using this for to send data nrf52 to appNordic

    memset(printf_buffer, 0x00, sizeof(printf_buffer));
    snprintf(printf_buffer, 10, "E1");
    length = strlen(printf_buffer);
    uint32_t err_code = ble_nus_data_send(&m_nus, (uint8_t *)printf_buffer, &length, m_conn_handle);

    i comented 

    uart_init

    uart_event_handle

    thanks and regards

  • Hi,

    It seems like snprintf() is dependent on retarget.c which overwrites the stido library such as fput and fcget to use UART commands such as app_uart_get() and app_uart_put(). Which means that if you want to disable UART to save current consumption then you would also have to omit the usage of snprintf().

    regards

    Jared 

Reply
  • Hi,

    It seems like snprintf() is dependent on retarget.c which overwrites the stido library such as fput and fcget to use UART commands such as app_uart_get() and app_uart_put(). Which means that if you want to disable UART to save current consumption then you would also have to omit the usage of snprintf().

    regards

    Jared 

Children
No Data
Related