Skip to content

LPC55xx USB not working with SPEED_OPTIMIZATIONS=y #78268

@maximevince

Description

@maximevince

Describe the bug
When using the USB stack on an LPC55x16, the USB device does not enumerate on the host, when using SPEED_OPTIMIZATIONS=y (gcc -O2 flag)

  • tested on LPC55S16, LPC5516 and LPC5526, but might affect other LPC55xx MCUs, too
  • tested using own application, but also on the samples/subsys/usb/cdc_acm sample application

To Reproduce
Steps to reproduce the behavior:

  1. cd zephyr/samples/subsys/usb/cdc_acm
  2. echo "CONFIG_SPEED_OPTIMIZATIONS=y" >> speedopt.conf
  3. west build -p always -b lpcxpresso55s16 -- -DEXTRA_CONF_FILE=speedopt.conf
  4. west flash
  5. No USB device shows up on the host

Expected behavior
USB device enumerates and shows up on the host.
E.g. when building the same cdc_acm sample without speed optimizations:

[169450.377321] usb 3-4.3: new high-speed USB device number 86 using xhci_hcd
[169450.469603] usb 3-4.3: New USB device found, idVendor=2fe3, idProduct=0001, bcdDevice= 3.07
[169450.469607] usb 3-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[169450.469609] usb 3-4.3: Product: Zephyr CDC ACM sample
[169450.469610] usb 3-4.3: Manufacturer: ZEPHYR
[169450.469612] usb 3-4.3: SerialNumber: AB7FB49B66CBCA73

Impact
Cannot use the speed optimizations in my application, which are crucial to get good performance.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain zephyr-sdk-0.16.3
  • Commit SHA: ccc4357f0a2 (Today's main)

Metadata

Metadata

Assignees

Labels

area: USBUniversal Serial BusbugThe issue is a bug, or the PR is fixing a bugplatform: NXP DriversNXP Semiconductors, driverspriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions