cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adri
Visitor
Visitor
383 Views
Registered: ‎07-30-2020

[SPI] Sent data failed with the half empty interrupt

Hi all,

I'm trying to send data continuously with an SPI bus.

To do it, I'm using the example code given by Xilinx to manage an interrupt.

As I want to send a big frame, I set the size of the buffer to be transmitted/received at 17 000.

By default, this is the XSP_INTR_TX_EMPTY_MASK which is used with the FIFO but it generates an over run and possibly inserts a delay when the FIFO is re- filled

To be sure there is no delay when a frame is sent, I activate the  XSP_INTR_TX_HALF_EMPTY_MASK, to refill the FIFO when it is half empty.

to delete.PNG

This solution partially works because at the last filling, data read does not match with data written.

To solve this problem, I have to modify the function XSpi_InterruptHandler in the driver of the SPI (xspi.c) by transforming the "ELSE" to an "ELSE IF + Condition" :

 

to delete 2.PNG

 
 

 

 

 

 

 

 

 

 

Modify the driver is not really a nice solution. Does anyone knows how to solve this problem, please?

Adri

Tags (4)
0 Kudos
1 Reply
venui
Moderator
Moderator
267 Views
Registered: ‎04-09-2019

Hi Adri,

can you please increase the FIFO sixe to max and check the same.

Regards,

Venu

0 Kudos