Ringing on SPI square wave and other SPI issues

ADC ---- ESP32
DIN  --> MISO
DOUT --> MOSI
SCLK --> SPICLK
CS#  --> SPICS

This is part of your problem -- "DIN" on the ADC means data into the ADC. "MISO" means master in, slave out (or it's a kind of soup) -- if you've got the processor configured as master, then you've got input to input and output to output (DOUT --> MOSI).

Also, you need to provide a decent ground return for the SPI signals, and you're getting cross-talk between your clock and the other signals. I can't see from your scope shot what the time base is set to, but you're not providing much of any ground return for the SPI, much less a good one.

Get your innies and outies matched up correctly: make sure inputs go to inputs, and outputs to outputs (and double-check -- getting serial connections hooked up out to out and in to in always seems to happen).

Then make a ground return for each SPI line. You should be able to get away with twisting each SPI line with a ground wire. Do this for each wire carrying SPI between the controller and the ADC. You want an extra ground wire twisted with the original wire (and connected to GND on each side). This may seem excessive, but for high-speed signals it is not. Start there, and let us know how it works. (Next steps are twisted pair taking care to make the twist lengths different, and after that try to find some high-impedance coax -- that's probably unnecessary, though).

Tags:

Spi

Adc

Ringing