Using QSPI on M4 - colibriIMX7D

I was wondering if is possible to use dual SPI interface with M4 in IMX7D.

I intend to use a AD7616 (High Speed ADC) that has Dual SPI interface and some interrupts GPIO.

Thanks in advance.

Hi @lennonbfn1 ,

It should be possible, but QuadSPI isn’t something very easy to understand quickly. You need to spend some time learning it, LUT table etc.
Why do you want 2pin data mode? 2 * 1MSPS * 16 bits should fit 40/50MHz SCLK with single data pin. Of course without added optional AD7616 CRC. Do you need CRC and fastest sample rate? Then yes, you need to use QuadSPI.

Interesting, AD7616 call it QSPI mode, but in QSPI two pads format data comes out interleaved to two pads like this:
IO0: bit6 bit4 bit2 bit0
IO1: bit7 bit5 bit3 bit1

this matches all memory chip formats and QuadSPI module doesn’t provide settings to change it to different order of bits. Here’s how AD7616 streams out serial data, and you will need to decode bit order to readable format:

Edward

Hi Edward. Thanks a lot for your suggestion.

I am evaluating the time of action that I need to read and process this information.

I won’t use the CRC. So we can do it in less time.

The image below shows that AD7616 send me the results one channel after the other in single SPI mode.

So I can get 6 differential channels (3 on channel A and 3 on channel B) in [16 bits * 0,02us (50MHz) * 2 (Channel A and B) * 3 (quantity of messages)] 1,92us.

Do you agree with this time in seconds above or am I missing any parameter?

I am really considering to use the single SPI as you said previously. Thank you in advance.

About that, QSPI, I saw in the AD 7616 datasheet that the IC send to MCU the result of the conversion on ADC A and ADC B in the same time in different wires, but not interleaved. For example SDOA send the result of ADC A in 0 in the same time that SDOB send the result of ADC B in 0 in different wires. I understood that the QSPI would read this in a independent way.

Regards.

Hi @lennonbfn1 ,

Regarding AD7616 output format, QSPI was intended for serial flash memory chips. I’m not sure which standard defines bit order in 2 and 4-bit mode, bet that bit order is defined and is not changeable. This isn’t show stopper for AD7616, but the little problem is you will need to de/interleave those bits using software. This is what surprised me. If AD tells it is QSPI capable chip, then I think it should output bits in expected QSPI bit order. At the other hand one could wire two AD7616 chips to 4-bit QSPI controller. Common clock, common SDI for register read/write, two serial data bits from one AD7616, two more serial data bits from another AD7616.

Regarding your former message and 6 channels. Differential? Simultaneous ADC conversion and taking difference doesn’t really make that conversion differential. For differential input you should better look for differential ADC’s or convert differential input into unipolar and then convert using unipolar ADC.

Regarding performing 3 AD conversions in 1.92us. 1.92us would be just data output time, don’t forget about CONVST pulse, which initiates each conversion. It is told as well in AD7616 datasheet that it is 1MSPS converter (two simultaneous channels so 2*1MSPS). 1 megasample per second, or 1us for one conversion. You can’t do 3 conversions in less than 3us. If you need faster throughput, then you should either look for faster ADC or wire 2 or more AD7616’s to QSPI. QSPI module on i.MX7 has parallel mode, so you could wire up to 4 two bit AD7616’s to 8bit QSPI.

Edward

1 Like

Hi Edward. Apologies for the delay.

About that, you’re right. I would like to say in the last comment 6 True bipolar measurements (3 on channel A and 3 on channel B).

It’s True. Thank you for the observation above. I was reviewing here, I think i have to to consider the 1us of each conversion, so: I think that I have to consider Conversion time plus transmission time.

I will read more about this suggestion.