cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
132 Views
Registered: ‎06-03-2020

SPI memory read/write on Arty-A7 with Microblaze

Hi All,

I've got an Arty-A7 100T using a MicroBlaze. I am using one of the AXI QUAD SPI examples - https://xilinx.github.io/embeddedsw.github.io/spi/doc/html/api/xspi__stm__flash__example_8c.html

It builds and runs but fails when comparing the received data. 

Using all the defaults it writes the data to the chip then retrieves it again. 

The first 4 bytes are the command message and memory location and the remaining are the data. But when I insert a breakpoint to look at the read and write buffers the write buffer correctly shows:

WriteBuffer[0] = '\003'
WriteBuffer[1] = '\000'
WriteBuffer[2] = '\000'
WriteBuffer[3] = '\000'
WriteBuffer[4] = ' '
WriteBuffer[5] = '!'

However, the readbuffer shows the following:

ReadBuffer[0] = '\000'
ReadBuffer[1] = '\000'
ReadBuffer[2] = '\000'
ReadBuffer[3] = '\000'
ReadBuffer[4] = '\377'
ReadBuffer[5] = '!'

The remainder of the two arrays is correct. However, it seems that index 4 of the array is either skipped or incorrectly read. The first 4 bytes (0 to 3) are skipped as they are not real data.

Does anyone know why this may be occurring?

Thanks in advance!

0 Kudos
0 Replies