Conversation
Signed-off-by: Zixun LI <admin@hifiphile.com>
Contributor
There was a problem hiding this comment.
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
|
MemBrowse Memory Reportat32f402_405-at_start_f402-cdc_msc
at32f403a_407-at32f403a_weact_blackpill-cdc_msc
at32f413-at_start_f413-cdc_msc
at32f423-at_start_f423-cdc_msc
at32f425-at_start_f425-cdc_msc
at32f435_437-at_start_f435-cdc_msc
ch32v10x-ch32v103r_r1_1v0-cdc_msc
ch32v20x-ch32v203c_r0_1v0-cdc_msc
ch32v30x-ch32v307v_r1_1v0-cdc_msc
da1469x-da14695_dk_usb-cdc_msc
fomu-fomu-cdc_msc
hpmicro-hpm6750evk2-cdc_msc
kinetis_k-frdm_k64f-cdc_msc
kinetis_k32l2-frdm_k32l2a4s-cdc_msc
kinetis_kl-frdm_kl25z-cdc_msc
lpc11-lpcxpresso11u37-cdc_msc
lpc13-lpcxpresso1347-cdc_msc
lpc15-lpcxpresso1549-cdc_msc
lpc17-lpcxpresso1769-cdc_msc
lpc18-lpcxpresso18s37-cdc_msc
lpc40-ea4088_quickstart-cdc_msc
lpc43-ea4357-cdc_msc
lpc51-lpcxpresso51u68-cdc_msc
maxim-apard32690-cdc_msc
mcx-frdm_mcxa153-cdc_msc
mm32-mm32f327x_mb39-cdc_msc
msp430-msp_exp430f5529lp-cdc_msc
msp432e4-msp_exp432e401y-cdc_msc
nrf-adafruit_clue-cdc_msc
nuc100_120-nutiny_sdk_nuc120-cdc_msc
nuc121_125-nutiny_sdk_nuc121-cdc_msc
nuc126-nutiny_nuc126v-cdc_msc
ra-portenta_c33-cdc_msc
samd11-cynthion_d11-cdc_dual_ports
samd5x_e5x-metro_m4_express-cdc_msc
samg-samg55_xplained-cdc_msc
stm32c0-stm32c071nucleo-cdc_msc
stm32f0-stm32f070rbnucleo-cdc_msc
stm32f1-stm32f103_bluepill-cdc_msc
stm32f2-stm32f207nucleo-cdc_msc
stm32f3-stm32f303disco-cdc_msc
stm32f4-feather_stm32f405-cdc_msc
stm32f7-stlinkv3mini-cdc_msc
stm32g0-stm32g0b1nucleo-cdc_msc
stm32g4-b_g474e_dpow1-cdc_msc
stm32h5-stm32h503nucleo-cdc_msc
stm32h7-stm32h743eval-cdc_msc
stm32h7rs-stm32h7s3nucleo-cdc_msc
stm32l0-stm32l052dap52-cdc_msc
stm32l4-stm32l412nucleo-cdc_msc
stm32n6-stm32n6570dk-cdc_msc
stm32u0-stm32u083cdk-cdc_msc
stm32u5-b_u585i_iot2a-cdc_msc
stm32wb-stm32wb55nucleo-cdc_msc
stm32wba-stm32wba_nucleo-cdc_msc
tm4c-ek_tm4c123gxl-cdc_msc
No memory changes detected for:
|
Owner
ah thanks, look like the access scheme is flexible for 1KB ram |
hathach
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe the PR
STM32U0 has 1024 byte PMA and 32bit access width.