ESP32S2 - Quad SPI Slave / QPI Example + Notes

KWolfe81
Posts: 14
Joined: Mon Dec 13, 2021 7:00 pm

ESP32S2 - Quad SPI Slave / QPI Example + Notes

Postby KWolfe81 » Thu Feb 17, 2022 9:08 pm

I went looking for an example of using the QuadSPI on the ESP32S2 in slave mode and couldn't find one. So I wrote one and am sharing it case anyone in the future goes down this road:

https://gitlab.com/kevinwolfe/esp32s2_qspi

All source code is in a single file: ./main/main.c
Test script included: ./tools/test_qspi.py (requires 'ft4222' lib, "pip install ft4222").

I am using an FT4222 development board in master to interact with the device. It's not a perfect example. First, I'm only doing DMA operations. Next, I could not get QuadSPI reads to work (e.g. master/host PC reads data from ESP32S2 slave device). Writes worked fine. My work-around is to only ever use QPI mode, which firmware automatically enters during SPI init. And lastly, I could only get QPI reads to work if I set the dummy bytes to 0xFF. No idea why that's the case, but it is what it is.

Good luck.

vsfred
Posts: 9
Joined: Mon Aug 15, 2022 12:12 pm

Re: ESP32S2 - Quad SPI Slave / QPI Example + Notes

Postby vsfred » Fri Oct 14, 2022 4:09 pm

Hello KWolfe81,

I would like to use Quad SPI in slave mode on my ESP32 S3. I'm interesting by your example. But your link is down, can you reload it ?

Thanks

natee.th
Posts: 26
Joined: Fri Feb 10, 2023 5:25 pm

Re: ESP32S2 - Quad SPI Slave / QPI Example + Notes

Postby natee.th » Tue Sep 19, 2023 3:09 pm

Hello KWolfe81, Me too Please.

dallim30
Posts: 20
Joined: Thu Apr 29, 2021 1:35 am

Re: How to use the upper 4MB of ESP-Wrover 8MB PSRAM

Postby dallim30 » Tue Sep 19, 2023 3:52 pm

Hello,

I am using an ESP-Wrover-Kit.
It has a 16MB external SPI flash and an additional 8 MB PSRAM.
In the datasheet, it is mentioned that up to 4 MB of PSRAM can be mapped into CPU data memory space at a time.
As only 4 MB memory space is considered for External SRAM (0x3F80_0000 to 0x3FBF_FFFF), how can I use (map) the extra 4MB?
What would be the CPU data memory address to map that extra 4MB?
Is there an option to use part of the 4MB mappable addres srange to bank-switch the remaining memory in?
Do any one have a clue and similar situation for me to take a reference?

Thanks!

Who is online

Users browsing this forum: No registered users and 341 guests