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

boards/blxxxpill: configure usbdev_fs #17812

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

benpicco
Copy link
Contributor

Contribution description

This attempts to enable the usbdev_fs module on STM32F1.
Unfortunately this does not work yet - It builds, but it looks like something else needs to be enabled on this platform.
Nothing shows up in dmesg when the USB test code is run (also no errors).

I don't know where to start looking for what it could be, but looking for some pointers to get USB support for this popular board.

Testing procedure

Flash e.g. tests/usbus_hid or tests/usbus_cdc_acm_stdio on a bluepill or blackpill board.

Issues/PRs references

@benpicco benpicco added State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Community: help wanted The contributors require help from other members of the community labels Mar 16, 2022
@benpicco benpicco requested review from dylad and removed request for DipSwitch, vincent-d, aabadie and fjmolinas March 16, 2022 12:13
@github-actions github-actions bot added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Platform: ARM Platform: This PR/issue effects ARM-based platforms labels Mar 16, 2022
@benpicco benpicco requested review from aabadie and maribu March 16, 2022 12:13
@maribu
Copy link
Member

maribu commented Mar 16, 2022

Are you aware of the wrong pull resistor strength bug of some early bluepill boards? Most USB hosts just worked anyway, but if you have such a board and a nitpicky machine, you might have to replace two resistors on the board.

@dylad
Copy link
Member

dylad commented Mar 16, 2022

My first guess (without a proper look on datasheet) would be it needs some clock configuration to enable this IP.
Maybe @bergzand knows better ?

@benpicco
Copy link
Contributor Author

Well I do get some interrupts (just 0x400 - RESET with this, when I remove the periph reset in the driver I get 0x2400 and 0x2100) so the peripheral must be clocked.

The USB interface works pretty much immediately with this minimal example.

@maribu maribu requested review from maribu and removed request for maribu August 13, 2022 12:28
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see inline

boards/common/blxxxpill/include/periph_conf.h Outdated Show resolved Hide resolved
boards/common/blxxxpill/Makefile.features Show resolved Hide resolved
@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Oct 13, 2022
@riot-ci
Copy link

riot-ci commented Oct 13, 2022

Murdock results

✔️ PASSED

d3d89aa boards/blxxxpill: configure usbdev_fs

Success Failures Total Runtime
1983 0 1983 06m:34s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 13, 2022
@benpicco benpicco force-pushed the boards/blxxxpill-usb branch from 2312b3e to da2473c Compare October 13, 2022 10:00
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 13, 2022
@dylad dylad added this to the Release 2022.10 milestone Oct 13, 2022
@maribu maribu added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 13, 2022
@benpicco
Copy link
Contributor Author

let's drop da2473c for now

@benpicco benpicco force-pushed the boards/blxxxpill-usb branch from da2473c to 8e9ba4b Compare October 13, 2022 13:23
@gschorcht
Copy link
Contributor

let's drop da2473c for now

Doesn't it work or what is the reason for that? Using the USB connector for the console would make the life much easier.

@benpicco
Copy link
Contributor Author

No it works fine. The problem is that it pushes some apps past the limit on the smaller boards and there was also a Kconfig issue remaining.

I simply dropped the default STDIO change to get this in before the feature freeze, then provide it in a follow up PR.

@maribu
Copy link
Member

maribu commented Oct 13, 2022

Please extend the Makefile.ci as required and squash. Compile test can be skipped this time.

@maribu maribu force-pushed the boards/blxxxpill-usb branch from 8e9ba4b to d3d89aa Compare October 13, 2022 19:59
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Oct 13, 2022
@maribu maribu added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Oct 13, 2022
@maribu maribu enabled auto-merge October 13, 2022 20:03
@maribu maribu merged commit ea0a535 into RIOT-OS:master Oct 13, 2022
maribu added a commit to maribu/RIOT that referenced this pull request Oct 14, 2022
This fixes incorrect module selection for STM32F1 boards with feature
periph_usbdev, a regression introduced by
RIOT-OS#17812
maribu added a commit to maribu/RIOT that referenced this pull request Oct 14, 2022
This fixes incorrect module selection for STM32F1 boards with feature
periph_usbdev, a regression introduced by
RIOT-OS#17812
maribu added a commit to maribu/RIOT that referenced this pull request Oct 14, 2022
This fixes incorrect module selection for STM32F1 boards with feature
periph_usbdev, a regression introduced by
RIOT-OS#17812
@benpicco benpicco deleted the boards/blxxxpill-usb branch October 14, 2022 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Community: help wanted The contributors require help from other members of the community Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants