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

Lpc55 port1 hs #808

Merged
merged 13 commits into from
Apr 26, 2021
Merged

Lpc55 port1 hs #808

merged 13 commits into from
Apr 26, 2021

Conversation

hathach
Copy link
Owner

@hathach hathach commented Apr 26, 2021

Describe the PR
This PR implement Port1 Highspeed for lpc55 and lpc546xx/lpc540xx (not tested on actual hardware). There is a few gotcha

  • LPC55 highspeed usb can only write/access to USB RAM (0x40100000), attribute((section("m_usb_global")))
  • USB RAM does not support unaligned access despite it is cortex M4. Extra macro TUP_MCU_STRICT_ALIGN is used to overwrite ARCH one, extra effort is also needed to prevent compiler to generate optimized code that result in unaligned access.
  • Full and Highspeed command/status words for buffer offset & nbytes are different
  • Lots of other works for multiple ports and mixed full/high speed support.
  • Tested worked with cdc_msc, hid_composite etc .. advanced class such as net and audio is not tested. ISO transfer is not yet supported.

@nxf58843 @gsteiert @UweBonnes may be interested.

@hathach hathach merged commit 684fba3 into master Apr 26, 2021
@hathach hathach deleted the lpc55-port1-hs branch April 26, 2021 14:04
@UweBonnes
Copy link
Contributor

" make BOARD=mcu_link flash" enumerates successfull. Thanks!
"make BOARD=mcu_link SPEED=full" gets overwritten by hw/bsp/lpc55/family.mk.

@hathach
Copy link
Owner Author

hathach commented Apr 26, 2021

" make BOARD=mcu_link flash" enumerates successfull. Thanks!
"make BOARD=mcu_link SPEED=full" gets overwritten by hw/bsp/lpc55/family.mk.

make BOARD=mcu_link PORT=0 to select fullspeed port0, unlike stm32, the lpc55 port1 always has HS PHY so it is always operated at highspeed.

@UweBonnes
Copy link
Contributor

The mcu_link has only port 1 connected.

@hathach
Copy link
Owner Author

hathach commented Apr 26, 2021

then just use it with highspeed, why would you want to force it to operate at fullspeed.

@UweBonnes
Copy link
Contributor

So the line "SPEED ?= high" in board.mk is superfluous. Should I do another PR, will you correct or does it not matter?

@hathach
Copy link
Owner Author

hathach commented Apr 26, 2021

yeah, it is not needed, no worry, I will may a push for to clean it up. Just done b5339ca

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

Successfully merging this pull request may close these issues.

2 participants