FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - zabuailah

Pages: [1]
1
Discussion - Hardware / SPI Slave
« on: March 03, 2023, 05:39:09 PM »
Hi,

I am using FT4222H-SPI-Slave to send data to an SPI-Master. As you know FT4222H-SPI-Slave appends a dummy byte (0x00) at the first byte automatically.

The master word size is 32-bit, so first I send 3 dummy bytes (0x000000), and then I send the actual data (I want the master to receive first a whole dummy word and then receive the actual data).

So I use FT4222_SPISlave_Write() twice and then notify the master to receive the data, as follows:
1. Call FT4222_SPISlave_Write() to buffer the 3 dummy bytes
2. Call FT4222_SPISlave_Write() again to buffer the actual data (two words: 0xAAAAAAAA, 0xBBBBBBBB)
3. Notify the master to receive the data

Results:
1. If the master receives the 3 words from FT4222H-SPI-Slave in one transaction, then it receives { 0x00000000, 0x00000000, 0x00000000 }
2. But if I modified the master code to receive each word in a separate transaction, then it receives { 0x00000000, 0x00AAAAAA, 0xAABBBBBB }

Question-1: Why FT4222H-SPI-Slave doesn't send the data correctly in the one transaction manner?
Question-2: Why FT4222H-SPI-Slave appends a dummy byte in the second word (0x00AAAAAA) in the multiple transactions manner?

Kindly, find attached the analyzer screenshots.

Pages: [1]