Current consumption using UARTE in interrupt mode [nrf9160]

Hi all,

I'm currently working on a project that requires UART communication, and I'm actually focusing on current consumption.

For context, my device only needs to listen for an incoming frame (variable length) on UART. This frame is sent by another device every seconds. There's no flow control mecanism, and I only have access to the TX (and ground btw) pin on the sending device.

I firstly configured UART in async mode (CONFIG_UART_ASYNC_API=y). This works well, but the current consumption is too high (~650μA idling). I tried to deactivate UART when it is no longer required (after successfully receiving a frame, deactivate UART and wait 500ms before re-enabling it), current consumption has been reduced (~350μA idling) but is again too high. Increasing waiting time is not a solution as UART is configured in async mode --> can't make sure when frame is processed by the app.

To reduce current consumption to the maximum, I need a faster way to isolate frame reception. This way, I can deactivate UART as soon as it is no longer needed and wait some time before renabling it:

  • When first character is received, a 960ms timer is launched.
  • When full frame is received, UART is disabled.
  • When timer elapses, UART is re-enabled to prepare next frame reception.

I then configured UART in interrupt mode (CONFIG_UART_INTERRUPT_DRIVEN=y). This works well, but I can't get to low power mode by disabling UART.. (~650μA idling). I tried several combination to diable UART, but none of them seems to work, even if I don't launch UART reception via "uart_irq_rx_enable()".  Am I missing something?

  • NRF_UARTE2_NS->TASKS_STOPRX = 1;
    NRF_UARTE2_NS->TASKS_STOPTX = 1;
    while(NRF_UARTE2_NS->EVENTS_RXTO==0);
    nrf_uarte_disable(NRF_UARTE2);
    • No effect on current consumption
  • uart_irq_rx_disable()
    • No effect on current consumption

Thank you in advance for your help.

Parents Reply Children
Related