Current consumption with MCUMGR over USB

Hello,

Creating a simple project in nrf connect 2.6.1 I start with looking at power consumption.

I need upgrade over USB, so I have added this to .prj:

CONFIG_MCUMGR=y
#CONFIG_MCUMGR_TRANSPORT_UART_MTU=512
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y

CONFIG_FLASH=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
# Enable most core commands.
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
#CONFIG_MCUMGR_GRP_STAT=y


# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Enable USB subsystem
CONFIG_USB_DEVICE_STACK=y

# Using nordic VID
CONFIG_USB_DEVICE_VID=0x1915

CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n

# USB backend is serial device

# Enable the serial mcumgr transport.
CONFIG_MCUMGR_TRANSPORT_UART=y
CONFIG_BASE64=y
CONFIG_CONSOLE=y

In the idle state of the program, the current consumption is around 1.45mA. 

If I remove the project CONFIGs stated above, the current consumption is normal in the idle state.

It does not matter wether <usb_enable(NULL);> is called or not. 

I suspect the serial interface (because there is no difference if the USB part is commented out).

How to turn off or disable serial and/or mcumgr for the sleep state, and turn it on again for the active state?

Thanks in advance.

Parents Reply Children
No Data
Related