From 3beaa799a92005bf1982d9c8bf65a368f5b1946f Mon Sep 17 00:00:00 2001 From: Jie Feng Date: Mon, 6 Jul 2026 00:15:22 +0800 Subject: Set larger AT32 FSDEV PMA area --- src/portable/st/stm32_fsdev/fsdev_common.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/portable/st/stm32_fsdev/fsdev_common.c') diff --git a/src/portable/st/stm32_fsdev/fsdev_common.c b/src/portable/st/stm32_fsdev/fsdev_common.c index 2b573899a..def3b2c2e 100644 --- a/src/portable/st/stm32_fsdev/fsdev_common.c +++ b/src/portable/st/stm32_fsdev/fsdev_common.c @@ -33,6 +33,11 @@ void fsdev_core_reset(void) { // Clear pending interrupts FSDEV_REG->ISTR = 0; + + #if (CFG_TUSB_MCU == OPT_MCU_AT32F403A_407) || (CFG_TUSB_MCU == OPT_MCU_AT32F413) + // Enable larger PMA area + CRM->misc1_bit.usbbufs = TRUE; + #endif } // De-initialize the USB Core -- cgit v1.3.1 From a3e58adf6008f3199cf653859bea4dc73217a55a Mon Sep 17 00:00:00 2001 From: Zixun LI Date: Sun, 19 Jul 2026 22:16:33 +0200 Subject: Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/portable/st/stm32_fsdev/fsdev_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/portable/st/stm32_fsdev/fsdev_common.c') diff --git a/src/portable/st/stm32_fsdev/fsdev_common.c b/src/portable/st/stm32_fsdev/fsdev_common.c index def3b2c2e..9c9233d12 100644 --- a/src/portable/st/stm32_fsdev/fsdev_common.c +++ b/src/portable/st/stm32_fsdev/fsdev_common.c @@ -36,7 +36,7 @@ void fsdev_core_reset(void) { #if (CFG_TUSB_MCU == OPT_MCU_AT32F403A_407) || (CFG_TUSB_MCU == OPT_MCU_AT32F413) // Enable larger PMA area - CRM->misc1_bit.usbbufs = TRUE; + CRM->misc1_bit.usbbufs = 1; #endif } -- cgit v1.3.1