-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32F7: Add support of the new USB Device API #8688
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
STM32F7: Add support of the new USB Device API #8688
Conversation
pin_function(PA_10, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)); // ID | ||
pin_function(PA_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_OTG_FS)); // SOF | ||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE(); | ||
|
||
#elif defined(TARGET_DISCO_F429ZI) | ||
__HAL_RCC_GPIOB_CLK_ENABLE(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related to F7 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this means you should test again F429 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit removed. Discussion closed...
21a6b61
to
4c300e7
Compare
@c1728p9 This has been waiting review for 5 days could you please take a look asap? |
@@ -300,10 +302,10 @@ __weak void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd) | |||
*/ | |||
HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd) | |||
{ | |||
__HAL_LOCK(hpcd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the lock removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been removed in the F4 (and L4 I think too) so I just did the same. Do you think it can cause a problem ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it being removed in the F4. Can you link to the PR which did this? If there isn't a good reason for removing this I would recommend leaving the lock in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will double-check the PCD Init,Start, Stop functions between the F2, F4, F7 and L4 devices and align them. I will send this change in a separate PR.
@@ -148,8 +149,9 @@ HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd) | |||
{ | |||
/* Allocate lock resource and initialize it */ | |||
hpcd->Lock = HAL_UNLOCKED; | |||
for (i = 0; i < hpcd->Init.dev_endpoints ; i++) | |||
hpcd->EPLock[i].Lock = HAL_UNLOCKED; | |||
for (i = 0; i < hpcd->Init.dev_endpoints ; i++) { // MBED PATCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see this change in the other PRs. Is this just cosmetic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes just cosmetic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change going to be upstreamed into the cube library? If not you may just want to leave this how it was to minimize the difference between the the cube library and the mbed fork.
Info: This PR has been re-bundled into a new rollup PR (#8768). No further work is needed here, as once that PR is merged, this PR will also be closed and marked as merged. |
@bcostm It looks like both PRs in the last rollup PR had issues. Please take a look at the F7-related build failures: #8768 (comment) |
4c300e7
to
9039079
Compare
I have rebased and added the NUCLEO_F756ZG board to fix the build error seen on this board during the Rollup PR. |
Starting CI |
I stoped the job, there are few other items that have dependency on features for 5.11, this will be restarted later (might take few days if that is OK, as we are close to the weekend) |
.tests-usb_device-serial.CDC USB reconnect test is only one which fails in multiple boards.. seems that this PR is related to that area. Please check what is root cause Test Result (15 failures / +15) |
@c1728p9 Mind helping out? |
5e4890d
to
6bfe9ea
Compare
65d71bb
to
0e5dd39
Compare
Hi @bcostm I rebased the USB feature branch to bring in a fix for the serial test when running with IAR. Because of this you'll need to rebase this PR.
Nope, the serial test wasn't written at that time. I did run it as part of the feature branch rebase. It passed all the USB tests - serial and basic:
|
6bfe9ea
to
3253654
Compare
Thanks @c1728p9 I have tested the NUCLEO_F207ZG/ARM and the Serial tests are also FAIL while they are PASS for you. Humm something's wrong with my setup 😕 |
We will start CI for this feature branch addition (to my understanding this is all fine for the feature branch) |
CI started |
8b6fffb
to
15f9389
Compare
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
CI job restarted: (Evne thought this still needs a rebase) |
3253654
to
ce6834f
Compare
Rebased |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Enable new USB Device API on the following STM32F7 platforms:
The same USB HAL patch as done for STM32F2, STM32F4 and STM32L4 has been applied (see PRs #7322
#8583 #8665)
Tests
Pull request type