dual sdo spi

DrM

Well-known member
Hi, I know the question has come up a few times. But, here we are in 2023 and many analog-digitcal-converters support dual and/or quad sdo. I suppose the same might apply to sdi. It is vitally important because it makes it possible support faster data conversions in the 1Msps range and up. Any chance of support for this on the Teensy 4.0 and 4.1?

Generally the way these work is that even bits com on SDO-1 and odd bits come on SDO-0, but I suppose being able to swap them can be useful. An example peripheral would be the ADS816x, a pretty nifty adc billed as a "direct sensor interface", With dual SDO, it can transfer 1MSPS with a 16MHz SCLK

Thank you
 

Attachments

  • temp.png
    temp.png
    58.1 KB · Views: 46
Hi, I know the question has come up a few times. But, here we are in 2023 and many analog-digitcal-converters support dual and/or quad sdo. I suppose the same might apply to sdi. It is vitally important because it makes it possible support faster data conversions in the 1Msps range and up. Any chance of support for this on the Teensy 4.0 and 4.1?

Generally the way these work is that even bits com on SDO-1 and odd bits come on SDO-0, but I suppose being able to swap them can be useful. An example peripheral would be the ADS816x, a pretty nifty adc billed as a "direct sensor interface", With dual SDO, it can transfer 1MSPS with a 16MHz SCLK

I will be curious to hear from Paul and others, but my understanding is the T4.x processors have SPI and FlexSPI, which is Quad SPI. They do not have a Dual SPI peripheral. The Quad SPI is described as being for external flash of "up to" 4 data bits, so maybe there is a way to configure FlexSPI as a Dual SPI for your purpose.
 
Using FlexIO it's technically possible to implement SPI using any power-of-2 number of pins.
 
Any chance of support for this on the Teensy 4.0 and 4.1?
....
An example peripheral would be the ADS816x

Can you be more specific? At the very least, can you give a link to the Analog Devices web page or datasheet (so we don't have to guess the last digit). Links to eval or breakout boards would also be good, for anyone who might have the time and interest (and funding) to play with these parts.

I'm also curious what you would imagine "support" to be?

If no maker-focused company like PJRC, Sparkfun, Adafruit makes a product with this chip, odds of a library specific for this chip is pretty unlikely.


I will be curious to hear from Paul and others, but my understanding is the T4.x processors have SPI and FlexSPI, which is Quad SPI. They do not have a Dual SPI peripheral. The Quad SPI is described as being for external flash of "up to" 4 data bits, so maybe there is a way to configure FlexSPI as a Dual SPI for your purpose.

FlexIO is probably the most viable path. It has hardware for 2, 4, 8 data pins.

I believe 1 of the regular SPI ports (LPSPI) has dual and quad hardware, but those pins aren't brought out on Teensy 4.1.

FlexSPI2 which is normally used for adding PSRAM or Flash storage on the bottom side of Teensy 4.1 probably isn't usable, even if you could solve the issue of connecting to the pads on bottom side of the PCB. The minimum clock speeds are probably too high. It also has an interface designed around memory, not so much general peripherals.
 
Can you be more specific? At the very least, can you give a link to the Analog Devices web page or datasheet (so we don't have to guess the last digit). Links to eval or breakout boards would also be good, for anyone who might have the time and interest (and funding) to play with these parts.

Sure, here it is. It is titled 816x in the datasheet, the last digit is 6, 7, or 8 for speeds 250ksps, 500ksps, or 1Msps. There is an eval kit at the bottom of the page.

https://www.ti.com/product/ADS8168https://www.ti.com/product/ADS8168


I'm also curious what you would imagine "support" to be? If no maker-focused company like PJRC, Sparkfun, Adafruit makes a product with this chip, odds of a library specific for this chip is pretty unlikely.

I meant just the dual SDO. I will probably write a library for the ADS816x.

FlexIO is probably the most viable path. It has hardware for 2, 4, 8 data pins.

I was thinking that. Dual and quad would be a nice addition to the FlexIO library. Since it is not my library I am hesitant to do it myself. In any case, it seems like it is becoming ever more important. All of the high performance ADC chips that I looked at support it.
 
FlexIO is probably the most viable path. It has hardware for 2, 4, 8 data pins.

I believe 1 of the regular SPI ports (LPSPI) has dual and quad hardware, but those pins aren't brought out on Teensy 4.1.

I could be wrong, but my reading of the LPSPI chapter of the RM is that 2-bit parallel half-duplex transfers can be done with available pins, as they require only SOUT and SIN.

- PCS0 and PCS1 are always chip selects
- SOUT and SIN are DATA[0] and DATA[1] for 2-bit and 4-bit transfers
- PCS2, PCS3 can be configured to be DATA[2], DATA[3] for 4-bit transfer

- set TCR WIDTH=1 for 2-bit transfer (0=1-bit, 1=2-bit, 2=4-bit, 3=reserved)
- set TCR RXMSK=1 to ignore RX data for a half-duplex transmit
- set TCR TXMSK=1 to ignore TX data for a half-duplex receive
 
Looking at the ADS8168 datasheet (admittedly only a quick glance), I see 2 pins for data output, but only 1 pin for data input which is indeed separate from the output pins. My impression from Figure 42 on page 31 is Teensy would need to transmit the upcoming channel selection on the 1 data input pin which simultaneously receiving the most recent data from the data output pins.
 
Looking at the ADS8168 datasheet (admittedly only a quick glance), I see 2 pins for data output, but only 1 pin for data input which is indeed separate from the output pins. My impression from Figure 42 on page 31 is Teensy would need to transmit the upcoming channel selection on the 1 data input pin which simultaneously receiving the most recent data from the data output pins.

Section 7.4.1.3 describes an auto-sequence mode, with auto-repeat, where the device cycles through the chosen channels on each CS. Could the T4.x SOUT be connected to allow write to the device's SDI for writing configuration data, and then switched to act as a data line for read?
 
That wouldn't work because the SDO-1 pin on the device and SOUT on the Teensy would both be connected to the device's SDI pin and end up driving it at the same time. The device accepts input at the same time as it sends output, as shown in the specs:
dual_sdo.png
so if SDO-1 and SIN were bridged (connected to a single pin on the Teensy), any data sent out would also be looped back as command data
 
That wouldn't work because the SDO-1 pin on the device and SOUT on the Teensy would both be connected to the device's SDI pin and end up driving it at the same time. The device accepts input at the same time as it sends output, as shown in the specs:
View attachment 31204
so if SDO-1 and SIN were bridged (connected to a single pin on the Teensy), any data sent out would also be looped back as command data

Maybe still possible with some digital I/O and "write enable/disable" circuitry, but not sounding very practical. Still interesting to learn of these additional capabilities of LPSPI.
 
Back
Top