nrf5340 current consumption of shell by using uart async api

Hi Nordic Team,

am I currently evaluating the nrf5340 development kit for our new product revision and fail to get a power efficient shell besides rtt logigng.

Concrete, I am trying to achieve the following:

* Debug Logging via RTT

* Shell access via UART (async API)

As a base, I have used the blinky example and added the following KConfig options to my prj.conf:


CONFIG_GPIO=y

# enable logging via segger RTT
CONFIG_LOG=y
CONFIG_LOG_PRINTK=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y

# uart
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

# enable shell
CONFIG_SHELL=y
CONFIG_SHELL_ASYNC_API=y
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_SHELL_BACKEND_SERIAL_API_ASYNC=y
CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n
CONFIG_SHELL_LOG_BACKEND=n

# CONFIG_PM=y
CONFIG_PM_DEVICE=y

The application works fine, but the current consumption in IDLE mode is not fine. I receive the logs via RTT and can connect to the UART shell.

The PPK2, in ampere mode, shows an average current of ~650uA, which is the UART peripheral.

If I disbale the SHELL (CONFIG_SHELL=n), the current drops to around ~3uA to 5uA, which is what I am targetting for. The current consumption is also fine, if I print log via the UART. But after enabling the CONFIG_SHELL option, it seems like that the UART never goes into IDLE mode. But I have enabled all possible ASYNC_API options I have found in the source code.

What I would expect is that the current remains at ~3uA to 5uA if no UART communication is going one.

Maybe you can help me to find the proper KConfig parameters to reduce the current consumption of the shell.

---

Update from my side: After some more reserach I think this current consumption is normal and caused by the active UART RX. My should already use the ASNY API of the UART.

So let me change this/add a new question. Is it possible to reduce the UART RX current somehow? I am thinking about:

* hardware control CTS/RTS lines (CONFIG_UART_LINE_CTRL=y) has not reduce the current for me

* wake on character (guess the nrf5340 does not support this)  

Best regards

Andreas Karner

Related