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

CFG_TUSB_RHPORT1_MODE not defined in STM build #1945

Closed
1 task done
dhalbert opened this issue Mar 9, 2023 · 4 comments
Closed
1 task done

CFG_TUSB_RHPORT1_MODE not defined in STM build #1945

dhalbert opened this issue Mar 9, 2023 · 4 comments
Labels

Comments

@dhalbert
Copy link
Contributor

dhalbert commented Mar 9, 2023

Operating System

Linux

Board

RP2040

Firmware

latest master, as of today

What happened ?

I'm bringing CircuitPython's use of tinyusb up to date. We were about a year behind. Compile error because CFG_TUSB_RHPORT1_MODE is not defined. This used to work, but I think that #1350 may have changed things.

if (!(rhport == 1 && (CFG_TUSB_RHPORT1_MODE & OPT_MODE_HIGH_SPEED))) usb_otg->GCCFG |= USB_OTG_GCCFG_PWRDWN;

The statement above is not guarded with #if against CFG_TUSB_RHPORT1_MODE not being defined.
Example failure: https://github.com/adafruit/circuitpython/actions/runs/4379438712/jobs/7665911868#step:10:56

FYI, we define CFG_TUSB_RHPORT1_MODE conditionally here:
https://github.com/adafruit/circuitpython/blob/353411af4b384ecc595215e9ce1ae95153c4cac1/supervisor/shared/usb/tusb_config.h#L67-L79

Would it be better to do that a different way now?

circuitpython PR is adafruit/circuitpython#7702

How to reproduce ?

see above

Debug Log as txt file

No response

Screenshots

No response

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
@hathach
Copy link
Owner

hathach commented Mar 10, 2023

@dhalbert you need to switch to the new dwc2 for stm32 since the one in st/synopsys will be removed shortly in the future. Maybe that would fix the compiled issue.

@dhalbert
Copy link
Contributor Author

you need to switch to the new dwc2 for stm32

Aha, I will try that.

@dhalbert
Copy link
Contributor Author

dwc2 builds and works, so I'll close this as unneeded since st/synopsys is going away.

@hathach
Copy link
Owner

hathach commented Mar 13, 2023

glad that works out for you, let me know if stm32 port has any issues with the new driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants