UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
1,077 Views
Registered: ‎09-25-2017

QuadSpi - 24 bit output

I'm trying to use a Microblaze to write configuration words to an Analog Devices part; it uses a standard 24-bit SPI transaction. 

 

Is there an example of this using the AXI QuadSpi?

0 Kudos
5 Replies
Participant mfryba
Participant
892 Views
Registered: ‎08-09-2018

Re: QuadSpi - 24 bit output

Me too!! Any answer?
0 Kudos
Observer skoehler
Observer
885 Views
Registered: ‎05-25-2018

Re: QuadSpi - 24 bit output

I need to talk to an AMC7812. It uses SPI transfers based on 24 bit words. The biggest problem is that the device requires the chip select line to be toggled after every 24 bit word. To "emulate" this, I would have to chose 8 bit word width and do lots of small 3 byte transfers. That would cause lots and lots of interrupts.

 

Also, attached to the same SPI bus are other devices which use regular 8bit words, where the chip select line stays low continuously.

 

Transaction width could really just be a counter in the IP core that tells when the chip select line needs to be triggered. Then, that counter could also be changed at runtime.

 

Anyhow, proper support for 24 word width would allow me to use the 256 byte FIFO and read all ADC channels with a single SPI transaction, for example, with minimal effort for the CPU.

0 Kudos
Participant mfryba
Participant
879 Views
Registered: ‎08-09-2018

Re: QuadSpi - 24 bit output

Talked to some folks, and the answer is apparently to use the Manual Slave Select mode of the core...you deliberately push SS low first by a write to the SPI Slave Select Register (0x70) with the bit set for the correct device. You then successively write the Data Transmit Register for 3 bytes, then you can put the SPI Slave Select back to 1.

 

I'm doing polled mode so that's not dealing with interrupts. Fortunately I don't have do push this out too often/fast.

 

0 Kudos
Observer skoehler
Observer
871 Views
Registered: ‎05-25-2018

Re: QuadSpi - 24 bit output

Yes, you set SS low, then send 3 byte, then set SS high when you get the interrupt that the 3 byte have been sent. But now you have to wait for a few ns before you set SS low again and you send the next 3 bytes.

 

The problem is doing that interrupt based.  I'm struggling to implement the delay between setting SS hight and setting SS low again.

A timer could be used, but I'd have to reserve a timer for especially that purpose.

 

Also, if SPI is running at 10MHz, having an interrupt every 3 bytes would be an interrupt every 2400ns. That just sounds very very crazy.

 

What about the SPI in the PS. Does it support anything other than 8bit words at all?

0 Kudos
Highlighted
Contributor
Contributor
282 Views
Registered: ‎04-26-2019

Re: QuadSpi - 24 bit output

UP

Same issue for me.

Only 8/16/32 bits available ?

 

0 Kudos