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

Add support for Composite USB on STM32 SDIO boards (experimental) #17222

Merged
merged 6 commits into from
Apr 22, 2020

Conversation

Bob-the-Kuhn
Copy link
Contributor

@Bob-the-Kuhn Bob-the-Kuhn commented Mar 20, 2020

This PR provides the Marlin support for the (hopefully) upcoming USB composite feature (SD card and CDC USB) in the ST STM32 library.

The STM32 library changes are in PR 586.

The changes needed to support the new feature are:

  • add flags to the platformio.ini environments to enable the USB composite feature
  • add a section to Sd2Card_sdio_stm32duino.cpp so that when the USB composite feature is enabled that the Marlin access of the SD card uses the USB drivers.

This has been tested on a STEVAL board and a BLACK STM32F407 board.

It has been tested on 16G SD cards.

My 4G SD card does not work with the SDIO interface. I need to look into that.

If composite USB is enabled  then use the composite USB drivers for the onboard SD card.

This is in preparation for USB composite changes to ST's STM32 library.

Tested on STEVAL board.
@Keltere
Copy link

Keltere commented Mar 20, 2020

Thanks, sorry to bother but this could add sd hosting capabilities to skr pro 1.1?

@thisiskeithb
Copy link
Member

Will this conflict with existing SKR Mini * USB composite support that was added separately?

@thinkyhead
Copy link
Member

@thisiskeithb — I don't think so. New code is added that depends on USBD_USE_CDC_COMPOSITE but the old code seems to still be preserved too. So this will only affect STM32F407VE_black and STM32F401VE_STEVAL builds.

@Bob-the-Kuhn
Copy link
Contributor Author

FYI - the SD card is available to both Marlin and the PC at the same time.

I tried making them mutually exclusive but couldn't figure out how to restart either.

@Bob-the-Kuhn
Copy link
Contributor Author

Bob-the-Kuhn commented Mar 21, 2020

@thisiskeithb - I just downloaded the SKR Mini schematic. It uses a SPI interface to the SD card so the SDIO changes do not affect it.

@Bob-the-Kuhn
Copy link
Contributor Author

@Keltere - the skr pro 1.1 uses a SPI interface for the SD card so this change does not affect this board.

@thinkyhead thinkyhead merged commit 33bb785 into MarlinFirmware:bugfix-2.0.x Apr 22, 2020
@Bob-the-Kuhn Bob-the-Kuhn deleted the Composite-SDIO branch June 8, 2020 16:44
jmp0x0000 pushed a commit to jmp0x0000/Marlin that referenced this pull request Aug 7, 2020
njibhu pushed a commit to njibhu/Marlin that referenced this pull request Aug 24, 2020
HairingX pushed a commit to HairingX/Marlin that referenced this pull request Jun 16, 2021
@dotdash32 dotdash32 mentioned this pull request Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: New Feature S: Don't Merge Work in progress or under discussion. S: Experimental
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants