Custom SPI with maximum frequency 80MHz

xkamail
Posts: 3
Joined: Fri Sep 27, 2024 4:41 am

Custom SPI with maximum frequency 80MHz

Postby xkamail » Fri Sep 27, 2024 5:03 am

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 ?

MicroController
Posts: 1725
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Custom SPI with maximum frequency 80MHz

Postby MicroController » 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

xkamail
Posts: 3
Joined: Fri Sep 27, 2024 4:41 am

Re: Custom SPI with maximum frequency 80MHz

Postby xkamail » 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 ?

ADC_A
ADC_B
ADC_C
ADC_D
DIN

MicroController
Posts: 1725
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Custom SPI with maximum frequency 80MHz

Postby MicroController » Wed Oct 02, 2024 10:14 am

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.

Bryght-Richard
Posts: 43
Joined: Thu Feb 22, 2024 3:59 pm

Re: Custom SPI with maximum frequency 80MHz

Postby Bryght-Richard » Fri Oct 04, 2024 9:15 pm

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.

Who is online

Users browsing this forum: No registered users and 415 guests