Set larger AT32 FSDEV PMA area

This commit is contained in:
Jie Feng
2026-07-06 00:15:22 +08:00
parent fcd5a0603e
commit 3beaa799a9
4 changed files with 10 additions and 3 deletions

View File

@ -184,7 +184,7 @@ Supported CPUs
| | MAX32 650, 666, 690, | ✅ | | ✅ | musb | 1-dir ep |
| | MAX78002 | | | | | |
+--------------+-----------------------------+--------+------+-----------+------------------------+--------------------+
| Artery AT32 | F403a_407, F413 | ✅ | | | stm32_fsdev | 512 USB RAM |
| Artery AT32 | F403a_407, F413 | ✅ | | | stm32_fsdev | 768 USB RAM |
| +-----------------------------+--------+------+-----------+------------------------+--------------------+
| | F415, F435_437, F423, | ✅ | ✅ | | dwc2 | |
| | F425, F45x | | | | | |

View File

@ -673,7 +673,9 @@
#elif TU_CHECK_MCU(OPT_MCU_AT32F403A_407, OPT_MCU_AT32F413)
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_AT32
#define CFG_TUSB_FSDEV_PMA_SIZE 512u
#define CFG_TUSB_FSDEV_PMA_SIZE 768u
#define CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE 2
#define CFG_TUSB_FIFO_HWFIFO_ADDR_STRIDE 4
#elif TU_CHECK_MCU(OPT_MCU_AT32F415)
#define TUP_USBIP_DWC2

View File

@ -17,7 +17,7 @@
#define FSDEV_USE_SBUF_ISO 0
#define FSDEV_REG_BASE (APB1PERIPH_BASE + 0x00005C00UL)
#define FSDEV_PMA_BASE (APB1PERIPH_BASE + 0x00006000UL)
#define FSDEV_PMA_BASE (APB1PERIPH_BASE + 0x00007800UL)
#ifndef CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP
#define CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP 0

View File

@ -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