Problem Migrating SPI interface from ESP32 to ESP32S3

IanKibblewhite
Posts: 11
Joined: Mon Feb 08, 2021 4:56 am

Problem Migrating SPI interface from ESP32 to ESP32S3

Postby IanKibblewhite » Fri Mar 03, 2023 1:12 am

We have an ESP32 application with a SPI interface to an FPGA. It's a simple 1-bit mode, half-duplex, CPU controlled Master using VSPI. It has to be fast so it's implemented using direct register control with a single core dedicated to the task. It works great!

It's part of a large application that we're migrating from the ESP32 to the ESP32S3, implementing the SPI FPGA interface using SPI2 through IO_MUX with the standard GPIO lines (GPIO10-13). We're testing with the ESP32-S3-DevKitC-1 with a WROOM-2. Our test code initializes the SPI (FPGA_SPI_On) and does basic read operation (Read_FPGA). We are trying setup SPI2 with the same functionality that is working with the ESP32 VSPI.

We're not getting any output on the SPI2 GPIO lines, although SPI_USER in SPI2_CMD_REG would to indicate that it appears to be trying to send. Maybe the IO_MUX or the CLK is not set up correctly, or there's some lock or power supply not enabled?

Attached is the ESP32 code that works and the ESP32S3 code and register dump/output that doesn't work

I'd appreciate any ideas or direction.

Thanks.
Ian
Attachments
S3 SPI Test Output.txt
Register dump and output from S3 SPI2 code
(3.3 KiB) Downloaded 285 times
ESP32S3 FPGA SPI Code.cpp
ESP32S3 SPI2 code that doesn't work
(3.34 KiB) Downloaded 271 times
ESP32 FPGA SPI Code.cpp
ESP32 VSPI code that works
(4.07 KiB) Downloaded 266 times

Who is online

Users browsing this forum: No registered users and 154 guests