Page 1 of 1

Custom SPI with maximum frequency 80MHz

Posted: Fri Sep 27, 2024 5:03 am
by xkamail
I want to use esp32-s3 to read data from analog to digital converter AD7386-4 which communicates by using SPI.

https://www.analog.com/en/products/ad73 ... rt-details

but the SPI of AD7386 is very custom.

It requires 4 wires for data out and 1 wire for data in.

The question is, is it possible to write SPI manually but still achieve 80MHz of clock without using the SPI interface of ESP32?

I don't know if 8 wire mode of ESP32 SPI can use only one data in and 4 data out ?

Re: Custom SPI with maximum frequency 80MHz

Posted: Fri Sep 27, 2024 8:17 am
by MicroController
"Quad Output" mode of the SPI peripheral may be what you need, see https://docs.espressif.com/projects/esp ... -line-mode

Re: Custom SPI with maximum frequency 80MHz

Posted: Mon Sep 30, 2024 12:11 pm
by xkamail
MicroController wrote:
Fri Sep 27, 2024 8:17 am
"Quad Output" mode of the SPI peripheral may be what you need, see https://docs.espressif.com/projects/esp ... -line-mode
Which means using 4 wires of data output from A/D ?
What about data into A/D ?
Do I have to share the same wire with in and out ?

ADC_A
ADC_B
ADC_C
ADC_D
DIN

Re: Custom SPI with maximum frequency 80MHz

Posted: Wed Oct 02, 2024 10:14 am
by MicroController
xkamail wrote:
Mon Sep 30, 2024 12:11 pm
MicroController wrote:
Fri Sep 27, 2024 8:17 am
"Quad Output" mode of the SPI peripheral may be what you need, see https://docs.espressif.com/projects/esp ... -line-mode
Which means using 4 wires of data output from A/D ?
What about data into A/D ?
Do I have to share the same wire with in and out ?
I guess not: https://docs.espressif.com/projects/esp ... s_config_t
Seems that MOSI can be set to a different pin than DATA0...3.

Re: Custom SPI with maximum frequency 80MHz

Posted: Fri Oct 04, 2024 9:15 pm
by Bryght-Richard
Could you use the I2S peripheral in parallel mode? This would be able to apply CS, drive clock, and read 2-8 bits in parallel, but I'm not sure if ESP could send to ADC at the same time. It can drive displays in parallel mode with DMA, and I think it can read too, but it may be half-duplex in parallel mode.