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

How to reach nRF52840 UARTE current supply specification ?

Hi, I work on the nRF52840-Preview-DK board. I try to make a ble to uart bridge and I start with the nRF5 SDK 14.0.0 ble_app_uart example.

I compare the current supply of the example and the same code without the uart initialization. The current supply is 0.8mA greater with the uart initialization. In the "nRF52840 Objective Product Specification v0.5" the electrical specification indicate 55uA.

If I call the function "app_uart_close()" after "uart_init()" the current supply is always 0.8mA greater than the code without uart initialization.

Parents
  • First of all, 0.8 mA (on nRF52840, no DCDC. 0.35 mA with DCDC enabled @3V) is the expected run current for the UARTE in RX or TX mode since HF clock is needed and the DMA bus is active.

    When you call app_uart_close() basically what happens is that the peripheral is disabled by writing 0 to the NRF_UARTE0->ENABLE register. Unfortunately, this seems to not stop the HF clk and close the DMA bus, which could be a bug. However, if you power cycle the peripheral after calling app_uart_close() the current consumption goes down. You can do that with this code:

    *(volatile uint32_t *)0x40002FFC = 0;
    *(volatile uint32_t *)0x40002FFC;
    *(volatile uint32_t *)0x40002FFC = 1;
    

    If you are using UARTE1 the base address is 0x40028000. infocenter.nordicsemi.com/.../uarte.html

    EDIT:

    Just adding that the UARTE TX has to be stopped explicitly when it's finished. If you just close the UART without stopping the transactions the UART will continue to keep the clocks running, as described above.

    This can be done through the nrfx_uarte_tx/rx_abort() functions, or the TASKS_STOPRX/TX registers directly.

    If you do this before disabling the UART the above workaround is not needed.

  • What is the intent of the second line of code?  Are you just trying to read the register?  The statement doesn't do anything, and even though it is marked volatile, many compilers will optimize it out. (Mine did.)  i just want to make sure I am handling the errata properly.

Reply Children
No Data
Related