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

ble_app_uart example SDK 17.0.2_d674dde draw too much current

Hi,

I'm using the ble nus uart for my application and I noticed that I was drawing too much current so I went back to the example from the SDK 17.0.2_d674dde which I haven't touch at all. I see that I have 0.95 mA for the current consumption, I am mesuring with the nrf52840 DK and a Fluke 179 True RMS multimetter

I also tested the ble_app_hrs and I have for the current consumption 0.04 mA

Could you tell me why I have such a difference ? 

Could you also tell me how I can decreased the consumption for the ble_app_uart example ? 

Best regards,

Parents Reply Children
  • Hello again,

    TermiteUser said:
    Can you tell how can I disable the UART ? Because I disabled it on the sdk_config.h and commented all the call of the uart but my current consumption increased even more...

    How did you disable this in the sdk_config, did you just set NRFX_UART_ENABLED to 0?
    Please make sure that you do not have both UART_ENABLED and NRFX_UART_ENABLED defined in your sdk_config at the same time.

    However, you do not have to remove the driver from the project all together in order to disable the UART peripheral, you could just uninitialized it.
    For a start you could initialize and enable the UART peripheral on the CONNECTED event in the ble_app_uart example, and uninit it at the DISCONNECTED event, then check how the power consumption changes when you enter into a connection.
    Do this, and let me know the difference you observe.

    TermiteUser said:
    Because I disabled it on the sdk_config.h and commented all the call of the uart but my current consumption increased even more...

    That sounds very strange. How much did your power consumption increase? 

    TermiteUser said:
    On my custom board I have about the same current consumption and it might come from the UART but I disabled it on the soft so I don't really understand.

    Please elaborate - on your custom board you have the same current consumption as what? Please be as specific as possible so that we may easier debug the issue.

    Best regards,
    Karl

  • Hello, 

    How did you disable this in the sdk_config, did you just set NRFX_UART_ENABLED to 0?
    Please make sure that you do not have both UART_ENABLED and NRFX_UART_ENABLED defined in your sdk_config at the same time.

    However, you do not have to remove the driver from the project all together in order to disable the UART peripheral, you could just uninitialized it.
    For a start you could initialize and enable the UART peripheral on the CONNECTED event in the ble_app_uart example, and uninit it at the DISCONNECTED event, then check how the power consumption changes when you enter into a connection.
    Do this, and let me know the difference you observe.

    I did as you ask and when I disabled with 

            *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */
            *(volatile uint32_t *)0x40002FFC;     
            *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */


    It it goes down to 500uA with APP_ADV_INTERVAL set to 64 and then I changed it to 300 and I have consumption about 50uA which is what I was looking for.

    I couldn't commented the uart_init() before because It caused it to crash but that was because there was a printf("\r\nUART started.\r\n"); in the example which uses the uart to print something. So I commented it and it didn't crash anymore.

    So I think it fixed my problem.

    Best regards,

  • Hello again,

    TermiteUser said:
    I couldn't commented the uart_init() before because It caused it to crash but that was because there was a printf("\r\nUART started.\r\n"); in the example which uses the uart to print something. So I commented it and it didn't crash anymore.

    Yes, the printf function is retargeted to use the UART, while the logger (NRF_LOG_*()) calls use RTT.

    TermiteUser said:
    I did as you ask and when I disabled with 
    TermiteUser said:
    It it goes down to 500uA with APP_ADV_INTERVAL set to 64 and then I changed it to 300 and I have consumption about 50uA which is what I was looking for.
    TermiteUser said:
    So I think it fixed my problem.

    Great, I am happy to hear that you were able to resolve your issues and achieve the power consumption levels you were looking for!

    Please do not hesitate to open another ticket if you should encounter any issues or questions in the future.

    Good luck with your development, and have a great weekend! :) 

    Best regards,
    Karl

Related