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: Remove extra USB thread on nRF54H
Removes the extra USB thread on nRF54H as it's no longer needed.
Sets the CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT timeout to allow the
usbd_enable() function to return error if the USB cable is not
connected.
Jira: NCSDK-28000
Jira: NCSDK-28381
Signed-off-by: Aleksander Strzebonski <[email protected]>
Copy file name to clipboardExpand all lines: applications/nrf_desktop/doc/usb_state.rst
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,17 +236,15 @@ The module sends the report using :c:struct:`hid_report_event`, that is handled
236
236
nRF54H20 support
237
237
================
238
238
239
-
Due to the characteristics of the nRF54H20 USB Device Controller (UDC), several changes have been made in the USB state module to support the nRF54H20 platform:
239
+
Due to the characteristics of the nRF54H20 USB Device Controller (UDC), following change has been made in the USB state module to support the nRF54H20 platform:
240
240
241
-
* The USB state module creates a separate thread to initialize, enable, and disable the USB stack.
242
241
* The module disables the USB stack when the USB cable is disconnected and enables the stack when the cable is connected.
243
242
244
-
These changes are applicable to the nRF54H20 platform only.
245
-
They are necessary to ensure proper USB stack operation on the nRF54H20 platform.
243
+
This change is applicable to the nRF54H20 platform only.
244
+
It is necessary to ensure proper USB stack operation on the nRF54H20 platform.
246
245
247
-
The USB stack cannot be initialized from the system workqueue thread, because it causes a deadlock.
248
-
Because of that, a separate thread is used to initialize the USB stack.
249
-
For more details, see the :ref:`CONFIG_DESKTOP_USB_INIT_THREAD <config_desktop_app_options>` Kconfig option.
246
+
The :kconfig:option:`CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT` Kconfig option is set to a non-zero value to prevent the :c:func:`usbd_enable` function from blocking the application forever when the USB cable is not connected.
247
+
Instead, the function returns an error on timeout.
250
248
The UDC is powered down whenever the USB cable is disconnected, failing to trigger the necessary callbacks to the USB stack.
251
249
It may cause the USB stack to become non-functional.
252
250
The USB stack is disabled upon disconnecting the cable to work around this issue.
0 commit comments