-
Notifications
You must be signed in to change notification settings - Fork 8.2k
usb: dfu: set bwPollTimeout dynamically #15330
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
usb: dfu: set bwPollTimeout dynamically #15330
Conversation
|
I tried to touch as little as possible. Side effects maybe possible. @Qbicz please test (works for me on reel board) Note, I think not that this PR makes #14662 obsolete. |
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.
@jfischer-phytec-iot thanks. I tested this and I was able to perform DFU with standard dfu-util which has 5 second USB operation timeout on a nrf52840_pca10056 which has longer erase time.
Thanks @tormodvolden for spotting this. I will close the issue in dfu-util once this is merged.
subsys/usb/class/Kconfig
Outdated
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.
Can we add a prompt so it will be user-configurable in case this is needed to be changed?
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.
sorry, the prompt should be there, will fix
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.
@Qbicz fixed
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.
Great. For me PR is fine
Set bwPollTimeout for DFU_GETSTATUS request dynamically. For now, adjust bwPollTimeout only during DNLOAD stage. Fixes: zephyrproject-rtos#8734 Signed-off-by: Johann Fischer <[email protected]>
Add config overlay for cdc_acm+dfu composite configuration. Manual configuration over menuconfig may be error-prone for the user because then FLASH_LOAD_OFFSET and FLASH_LOAD_SIZE should also to be set to appropriate values. Signed-off-by: Johann Fischer <[email protected]>
626f005 to
1f35592
Compare
subsys/usb/class/Kconfig
Outdated
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.
Great. For me PR is fine
|
@barsok can you test this today? |
|
@jfischer-phytec-iot what's the preferred way to use 2 .conf files together? We tried with @barsok and the only way that worked was to create a CMake list with |
|
@Qbicz I do it like this, too. |
|
@carlescufi I have tested the code and I have found presumably unwanted behaviour: [reset] -> dfu read, bwPollTimeout==256 -> dfu download -> error during download, bwPollTimeout remains at 10000, -> dfu upload bwPollTimeout==10000. In English, an error during download does not bring bwPollTimeout to default value |
|
@jfischer-phytec-iot can you confirm the report from @barsok? |
Set bwPollTimeout for DFU_GETSTATUS request dynamically.
For now, adjust bwPollTimeout only during DNLOAD stage.
Fixes #8734