-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix stm32u0 data stride #3472
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
base: master
Are you sure you want to change the base?
fix stm32u0 data stride #3472
Conversation
Signed-off-by: Zixun LI <[email protected]>
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.
Pull request overview
This PR adjusts TinyUSB’s STM32 FS device configuration so that STM32U0, which has a 1024-byte PMA but 32-bit access width, uses the correct data/address stride and access scheme.
Changes:
- In
tusb_option.h, special-cases STM32U0 so that althoughCFG_TUSB_FSDEV_PMA_SIZEis 1024, it uses the 32-bit FIFO data and address stride settings previously used only for 2048-byte PMA devices. - In
fsdev_common.h, similarly special-cases STM32U0 so that it uses the 32-bit PMA access scheme andFSDEV_BUS_32BITdefinitions instead of the generic 1024-byte (16-bit) scheme.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/tusb_option.h | Adjusts FSDEV FIFO data/address stride macros so STM32U0 with 1024-byte PMA uses 32-bit (stride 4) configuration instead of the generic 16-bit configuration. |
| src/portable/st/stm32_fsdev/fsdev_common.h | Updates PMA access scheme selection so STM32U0 is treated like a 32-bit bus device despite having a 1024-byte PMA. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
TinyUSB Average Code Size Metrics
Input files
|
Describe the PR
STM32U0 has 1024 byte PMA and 32bit access width.