Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: subsys: usb: Failed to enable USB at nrf54h20 #73004

Closed
nordic-piks opened this issue May 20, 2024 · 2 comments · Fixed by #73269
Closed

samples: subsys: usb: Failed to enable USB at nrf54h20 #73004

nordic-piks opened this issue May 20, 2024 · 2 comments · Fixed by #73269
Assignees
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@nordic-piks
Copy link
Collaborator

nordic-piks commented May 20, 2024

Describe the bug
Tests:

  • samples/subsys/usb/cdc_acm/sample.usb.cdc-acm.comp
  • samples/subsys/usb/audio/headset/sample.usb.audio.headset
  • samples/subsys/usb/audio/headphones_microphone/sample.usb.audio.headphones_microphone
  • samples/subsys/usb/mass/sample.usb.mass_ram_none
  • samples/subsys/usb/mass/sample.usb.mass_ram_fat
  • samples/subsys/usb/mass/sample.usb_device_next.mass_ram_none
  • samples/subsys/usb/cdc_acm_composite/sample.usb.cdc-acm-composite
  • samples/subsys/usb/cdc_acm/sample.usb_device_next.cdc-acm
  • samples/subsys/usb/cdc_acm/sample.usb.cdc-acm
    Also:
  • tests/subsys/usb/device/usb.device

Observed for

  • nrf54h20dk/nrf54h20/cpuapp

To Reproduce
Steps to reproduce the behavior:

  1. have nrf54h20dk/nrf54h20/cpuapp connected
  2. go to your zephyr dir
  3. call ./scripts/twister -T samples/subsys/usb -p nrf54h20dk/nrf54h20/cpuapp --device-testing --device-serial /dev/ttyACM0 -v --inline-logs
  4. See console output with error

Expected behavior
Valid console output

Impact
Not clear

Logs and console output
samples/subsys/usb/cdc_acm/sample.usb.cdc-acm.comp

*** Booting Zephyr OS build v3.6.0-4231-g7046c9030e70 ***
[00:00:00.080,617] <err> usb_dc_dw: USB reset HANG! AHB Idle GRSTCTL=0x00000000
[00:00:00.080,621] <err> cdc_acm_echo: Failed to enable USB

samples/subsys/usb/audio/headset/sample.usb.audio.headset

*** Booting Zephyr OS build v3.6.0-4231-g7046c9030e70 ***
[00:00:00.011,806] <inf> main: Entered main
[00:00:00.011,811] <inf> main: Found USB Headset Device
[00:00:00.011,828] <err> usb_descriptor: Failed to validate endpoints
[00:00:00.011,831] <err> usb_descriptor: Failed to fixup USB descriptor
[00:00:00.011,834] <err> usb_device: Failed to configure USB device stack
[00:00:00.011,840] <err> main: Failed to enable USB

tests/subsys/usb/device/usb.device

*** Booting Zephyr OS build v3.6.0-4231-g7046c9030e70 ***
Running TESTSUITE device_usb
===================================================================
D: lock usb_enable_lock mutex
D: __usb_descriptor_start 0x2f01114c
D: __usb_descriptor_end 0x2f0111bd
D: Device descriptor 0x2f01114c
D: ep 0, mps 64, type 0
D: Set bMaxPacketSize0 64
D: Configuration descriptor 0x2f01115e
D: Interface descriptor 0x2f011167
D: Endpoint descriptor 0x2f011170
D: ep 81, mps 64, type 2
D: Fixing EP address 81 -> 81
D: endpoint 0x81
D: Now the wTotalLength is 25
D: idx_max 11, ascii_idx_max 5, buf 0x2f01117d
D: char R : 52, idx 5 -> 11
D: char Y : 59, idx 4 -> 9
D: char H : 48, idx 3 -> 7
D: char P : 50, idx 2 -> 5
D: char E : 45, idx 1 -> 3
D: char Z : 5a, idx 0 -> 1
D: idx_max 13, ascii_idx_max 6, buf 0x2f01118b
D: char V : 56, idx 6 -> 13
D: char E : 45, idx 5 -> 11
D: char D : 44, idx 4 -> 9
D: char - : 2d, idx 3 -> 7
D: char B : 42, idx 2 -> 5
D: char S : 53, idx 1 -> 3
D: char U : 55, idx 0 -> 1
D: idx_max 31, ascii_idx_max 15, buf 0x2f01119b
D: char F : 46, idx 15 -> 31
D: char E : 45, idx 14 -> 29
D: char D : 44, idx 13 -> 27
D: char C : 43, idx 12 -> 25
D: char B : 42, idx 11 -> 23
D: char A : 41, idx 10 -> 21
D: char 9 : 39, idx 9 -> 19
D: char 8 : 38, idx 8 -> 17
D: char 7 : 37, idx 7 -> 15
D: char 6 : 36, idx 6 -> 13
D: char 5 : 35, idx 5 -> 11
D: char 4 : 34, idx 4 -> 9
D: char 3 : 33, idx 3 -> 7
D: char 2 : 32, idx 2 -> 5
D: char 1 : 31, idx 1 -> 3
D: char 0 : 30, idx 0 -> 1
I: Skip pinctrl configuration
E: USB reset HANG! AHB Idle GRSTCTL=0x00000000
D: unlock usb_enable_lock mutex
Assertion failed at ../../../../../../../../../zephyr/zephyr/tests/subsys/usb/device/src/main.c:198: device_usb_setup: (ret == 0 is false)
Failed to enable USB
START - test_usb_dc_api
FAIL - test_usb_dc_api in 0.001 seconds
===================================================================
START - test_usb_dc_api_invalid
FAIL - test_usb_dc_api_invalid in 0.001 seconds
===================================================================
START - test_usb_dc_api_read_write
FAIL - test_usb_dc_api_read_write in 0.001 seconds
===================================================================
START - test_usb_deconfig
FAIL - test_usb_deconfig in 0.001 seconds
===================================================================
START - test_usb_disable
FAIL - test_usb_disable in 0.001 seconds
===================================================================
TESTSUITE device_usb failed.
------ TESTSUITE SUMMARY START ------
SUITE FAIL -   0.00% [device_usb]: pass = 0, fail = 5, skip = 0, total = 5 duration = 0.005 seconds
- FAIL - [device_usb.test_usb_dc_api] duration = 0.001 seconds
- FAIL - [device_usb.test_usb_dc_api_invalid] duration = 0.001 seconds
- FAIL - [device_usb.test_usb_dc_api_read_write] duration = 0.001 seconds
- FAIL - [device_usb.test_usb_deconfig] duration = 0.001 seconds
- FAIL - [device_usb.test_usb_disable] duration = 0.001 seconds
------ TESTSUITE SUMMARY END ------
===================================================================
RunID: 0eebf74bc776af58fb5a81246a46a5cb
PROJECT EXECUTION FAILED

Environment (please complete the following information):

  • OS: Ubuntu 20.04.1 LTS
  • Toolchain Zephyr SDK 0.16.5
  • Commit SHA or Version used: v3.6.0-4231-g7046c9030e70
@nordic-piks nordic-piks added the bug The issue is a bug, or the PR is fixing a bug label May 20, 2024
@nordic-piks
Copy link
Collaborator Author

@jfischer-no Most probably after this #72774

@jfischer-no jfischer-no added priority: low Low impact/importance bug area: USB Universal Serial Bus labels May 20, 2024
@jfischer-no
Copy link
Collaborator

These are for the "legacy" stack, maybe we need a new feature to distinguish them:

supported:
  - usb_device
  - usbd

https://docs.zephyrproject.org/3.6.0/develop/test/twister.html#board-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants