Sleep current during k_sleep()

In a nrf52840 project using Zephyr 3.0 following Zephyr drivers are used:

  • the modbus serial driver(RTU mode) which uses uart1 in interrupt mode
  • the lora-mac driver which uses spi1
  • serial logging on uart0

The application works fine but during inactivity periods the standby current is sometimes much too high: 520uA instead of ~10uA

I know that the uarts don't suspend automatically so immediately before k_sleep() I execute:

pm_device_action_run(uart0, PM_DEVICE_ACTION_SUSPEND);
pm_device_action_run(uart1, PM_DEVICE_ACTION_SUSPEND);

Without success I also tried:

  • executing nrf_uart_errorsrc_get_and_clear() for both uarts before k_sleep().
  • disable logging completely but as well without success.
  • "disable" all unneeded periphery in the device tree.
  • checked thread activity via the Zephyr Thread Analyzer but I could not find excessive activity.
  • executing pm_device_action_run()  for spi1, gpio0, gpio1 , ...
  • modbus_disable() during sleep
  •  ...

Do you have any hints how I could enclose or solve the problem?

Thx  Matthias

Parents Reply Children
No Data
Related