fdcavalcanti opened a new pull request, #19768: URL: https://github.com/apache/nuttx/pull/19768
## Summary <!-- This field should contain a summary of the changes. It will be pre-filled with the commit's message and descriptions. Adjust it accordingly --> * arch/risc-v/espressif: fix SPI IOMUX false positive without SPI2 SPI_VIA_IOMUX used SPI2 IOMUX pin macros that are undefined when SPI2 is disabled or on chips without IOMUX SPI pins (e.g. ESP32-P4), so the driver took the IOMUX path and never routed SPI3 via the GPIO matrix. Assisted-by: Cursor Grok 4.5 ## Impact <!-- Please fill the following sections with YES/NO and provide a brief explanation --> Impact on user: No. <!-- Does it impact user's applications? How? --> Impact on build: No. <!-- Does it impact on building NuttX? How? (please describe the required changes on the build system) --> Impact on hardware: Fixes issue when using SPI3 but not SPI2, which routed CS pin on the wrong path. <!-- Does it impact a specific hardware supported by NuttX? --> Impact on documentation: No. <!-- Does it impact the existing documentation? Please provide additional documentation to reflect that --> Impact on security: No. <!-- Does it impact NuttX's security? --> Impact on compatibility: No. <!-- Does it impact compatibility between previous and current versions? Is this a breaking change? --> ## Testing Tested on `esp32p4-tab5` SD Card support using SPI3. ### Building Build NSH defconfig with SPI3, SDMMC and FAT_FS support. ### Results Before changes: ``` esp_spi_poll_send: send=0x95 and recv=0x0 esp_spi_poll_send: send=0xff and recv=0x0 mmcsd_mediainitialize: ERROR: Send CMD0 failed: R1=00 ``` The SD Card would fail to mount since improper data was present on SPI bus. After changes: ``` nsh> mount -t vfat /dev/mmcsd0 /mnt nsh> ls /mnt /mnt: hello.txt nsh> cat /mnt/hello.txt Hello World nsh> echo 'NuttX RTOS' >> /mnt/hello.txt nsh> cat /mnt/hello.txt Hello World! NuttX RTOS ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
