feat(usb_host): Move DMA capable memory to external ram on P4

- DWC-OTG internal DMA can access psram on esp32p4
    - Move DMA memory buffs to psram, to save internal ram
    - HCD tests and MSC example runs in CI with psram enabled
This commit is contained in:
peter.marcisovsky
2025-05-13 13:31:17 +02:00
parent fe75355314
commit 95bd653ec1
14 changed files with 108 additions and 32 deletions
+10
View File
@@ -175,6 +175,16 @@ menu "USB-OTG"
If enabled, the enumeration filter callback can be set via 'usb_host_config_t' when calling
'usb_host_install()'.
config USB_HOST_DWC_DMA_CAP_MEMORY_IN_PSRAM
depends on IDF_TARGET_ESP32P4 && SPIRAM
bool "Allocate USB_DWC DMA capable memory in PSRAM"
default n
help
In the ESP32P4, the USB-DWC internal DMA can access external RAM. Enabling this configuration can save
internal RAM by allocating the memory buffers used by the USB-DWC peripheral's DMA to external RAM.
However, it introduces minor performance degradation due to the overhead of accessing external RAM.
# Todo: IDF-11368 (aligned memory alloc size)
# Hidden or compatibility options
config USB_OTG_SUPPORTED
# Invisible config kept for compatibility