SPI WriteData / ReadData Values

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

I write 0x03 and read it, than
I write 0x07 and read it, than
I write 0x03 again and read it.

Now my Output has following values:
00000011 (true)
00000110 (why 6? i wrote 7)
00000010 (why 2? i wrote 3)

Can anyone tell me why it dont take the right values to the output?
0 Likes
4 Replies
Not applicable
Hi Markus,

Are you using Apps API eg. SPI001_WriteData/ReadData() to write/read data? The APIs are defined in SPI001.c. You may be aware that the FIFO buffer is always enabled if using Apps.

BR,
Zain
0 Likes
Not applicable
Hi Markus,

Have you set the Transmit and Receive FIFO sizes in the SPI001 App configuration tab ? I suggest both are set to 4 to support your example.

Best regards
Aaron
0 Likes
User8570
Level 3
Level 3
Aaron

Can you explain why the FIFO sizes should be set to 4? I am having a delay between transmission and wondering if I should change the FIFO size.
0 Likes
Not applicable
Hi jptalledo,

You either need to wait for the previous write to finish before writing again or you should set the FIFO size to be equal or greater than the number of writes you want to do.

Best regards
Aaron
0 Likes