Zephyr related - how to disable (uart-) shell during runtime?

Hi,

as i would like to use the uart shell for production purposes as well (e.g. setting the devices serial number) - how can i turn off the shell at runtime (in order to enter low power mode and measure the device's current consumption)? As the shell is startet automatically using SYS_INIT(), i would assume that calling shell_uninit() should disable it again, but the current consumption is still to high.

Regards

Ulf

Parents Reply Children
  • Sorry, I misread the function name and thought you were using the UARTE HAL to write to the UARTE->ENABLE register. rx_disable -> uarte_nrfx_rx_disable() will properly disable UART reception and cause the idle current to drop to around 20 uA. Note that PM_DEVICE_ACTION_SUSPEND will also disable the peripheral, which should reduce the idle current further.

Related