FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


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.

Messages - emmanuel

Pages: [1]
At least in testing, a non locking ring buffer works.     
Was hoping to learn something a bit more elegant. :-)

Discussion - Software / FT4222 CLK Settings CPOL/CPHA wrong in user manual?
« on: September 09, 2019, 11:53:04 PM »
I have an issue where the SPI Master locks up if the FT4222 is configured in the following way:
Code: [Select]
    ftStatus = FT_OpenEx("FT4222",FT_OPEN_BY_DESCRIPTION, &ftHandle);
    ftStatus = FT4222_SetClock(ftHandle, SYS_CLK_80);
    ftStatus = FT4222_GetVersion(ftHandle, &ft4222Version);
    ftStatus = FT4222_SPISlave_InitEx(ftHandle, SPI_SLAVE_NO_PROTOCOL);
    ftStatus = FT4222_SPISlave_SetMode(ftHandle, CLK_IDLE_HIGH, CLK_LEADING);

The SPI Master in my case is an HC16 Motorola MCU.   
I can confirm its SPI Master configuration is:
Code: [Select]

When I use the CLK_IDLE_HIGH/CLK_LEADING on the FT4222, the first write from the FT4222 will halt the Master.
If using CLK_IDLE_HIGH/CLK_TRAILING, the Master does not halt.

Looking at the definition for CLK_TRAILING, the bit seems to be swapped with _LEADING.
In my experience, *leading is typically '1' and *trailing is '0';  This is the case for most of my MCU experience.

Have I made a mistake someplace else or is the values set for CLK_LEADING / CLK_TRAILING backwards?

Hi;   I'm using FT4222 in SPI Slave Mode 3 and thought I'd like to see how others are implementing their own protocols.

I've looked at the examples (both linux and windows) but nothing really outlined an example protocol.
What I'm really interested in is how other engineers handle incoming data from their spi-master.

Something we're currently dealing with is a Master who can not be modified which as forced us to use no_protocol.
Using no_protocol does generate a lot of data.  Seems to be a lot of clock sync.

How are you guys handling these situations?   Looking for a C example or even pseudo example.

Pages: [1]