You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
applications: nrf_desktop: Require zero latency in PM while USB active
Require zero latency in Power Management while USB is active to ensure
high performance. While USB is active, application power down is blocked
anyway.
Jira: NCSDK-30503
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
To enable the module, use the :ref:`CONFIG_DESKTOP_USB_PM_ENABLE <config_desktop_app_options>` Kconfig option.
27
-
It depends on the options :ref:`CONFIG_DESKTOP_USB_ENABLE <config_desktop_app_options>` and :kconfig:option:`CONFIG_CAF_POWER_MANAGER`.
30
+
It depends on the options :ref:`CONFIG_DESKTOP_USB_ENABLE <config_desktop_app_options>` and :kconfig:option:`CONFIG_CAF_PM_EVENTS`.
28
31
29
32
The log level is inherited from the :ref:`nrf_desktop_usb_state`.
30
33
34
+
System Power Management integration
35
+
===================================
36
+
37
+
Zephyr's System Power Management (:kconfig:option:`CONFIG_PM`) does not automatically take into account (expect) wakeups related to user input and finalized HID report transfers over USB.
38
+
This results in entering low power states if no work is scheduled to be done in the nearest future.
39
+
If you use Zephyr's System Power Management, the module automatically requires zero latency in the Power Management while USB is active.
40
+
This is done to prevent entering power states that introduce wakeup latency and ensure high performance.
41
+
You can control this feature using the :ref:`CONFIG_DESKTOP_USB_PM_REQ_NO_PM_LATENCY <config_desktop_app_options>` Kconfig option.
42
+
31
43
Implementation details
32
44
**********************
33
45
34
-
For the change of the restricted power level, the module reacts to :c:struct:`usb_state_event`.
35
-
Upon reception of the event and depending on the current USB state, the module requests different power restrictions:
46
+
The module reacts to the :c:struct:`usb_state_event`.
47
+
Upon reception of the event and depending on the current USB state, the module requests different power restrictions.
48
+
For more information about the USB states in nRF Desktop, see the :ref:`nrf_desktop_usb_state`.
49
+
50
+
Application power level
51
+
=======================
52
+
53
+
The application power level is imposed using the :c:struct:`power_manager_restrict_event`.
36
54
37
55
* If the USB state is set to :c:enum:`USB_STATE_POWERED`, the module restricts the power down level to the :c:enum:`POWER_MANAGER_LEVEL_SUSPENDED`.
38
56
* If the USB state is set to :c:enum:`USB_STATE_ACTIVE`, the :c:enum:`POWER_MANAGER_LEVEL_ALIVE` is required.
39
57
* If the USB state is set to :c:enum:`USB_STATE_DISCONNECTED`, any power level is allowed.
40
58
* If the USB state is set to :c:enum:`USB_STATE_SUSPENDED`, the :c:enum:`POWER_MANAGER_LEVEL_SUSPENDED` is imposed.
41
-
The module restricts the power down level to the :c:enum:`POWER_MANAGER_LEVEL_SUSPENDED` and generates :c:struct:`force_power_down_event`.
59
+
The module restricts the power down level to the :c:enum:`POWER_MANAGER_LEVEL_SUSPENDED`.
60
+
The module also submits a :c:struct:`force_power_down_event` to force a quick power down.
42
61
43
-
For more information about the USB states in nRF Desktop, see the :ref:`nrf_desktop_usb_state`.
62
+
System Power Management latency
63
+
===============================
64
+
65
+
The latency requirements of the System Power Management are updated using the :c:func:`pm_policy_latency_request_add` and :c:func:`pm_policy_latency_request_remove` functions.
66
+
The zero latency requirement is added when USB state is set to :c:enum:`USB_STATE_ACTIVE`.
67
+
The requirement is removed if USB enters another state.
Copy file name to clipboardexpand all lines: doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
+2
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,8 @@ nRF Desktop
287
287
For details, see the :ref:`nrf_desktop_board_configuration`.
288
288
* The ``dongle_small`` configuration for the nRF52833 DK.
289
289
The configuration enables logs and mimics the dongle configuration used for small SoCs.
290
+
* Requirement for zero latency in Zephyr's :ref:`zephyr:pm-system` while USB is active (:ref:`CONFIG_DESKTOP_USB_PM_REQ_NO_PM_LATENCY <config_desktop_app_options>` Kconfig option of the :ref:`nrf_desktop_usb_state_pm`).
291
+
The feature is enabled by default if Zephyr Power Management (:kconfig:option:`CONFIG_PM`) is enabled to prevent entering power states that introduce wakeup latency and ensure high performance.
290
292
291
293
* Removed an imply from the nRF Desktop Bluetooth connectivity Kconfig option (:ref:`CONFIG_DESKTOP_BT <config_desktop_app_options>`).
292
294
The imply enabled a separate workqueue for connection TX notify processing (:kconfig:option:`CONFIG_BT_CONN_TX_NOTIFY_WQ`) if MPSL was used for synchronization between the flash memory driver and radio (:kconfig:option:`CONFIG_SOC_FLASH_NRF_RADIO_SYNC_MPSL`).
0 commit comments