Hi, I can activate the four modes on a FT4232H, but there is some strange clock inversions at each bytes for cpol=0, cpha=1 and cpol=1, cpha=0 modes.
You can look at the code of my lib on http://code.google.com/p/libftdispi/ Extract from ftdispi.h : - CPOL=0 CPHA=0 => Mode 0, W=FE R=RE - CPOL=0 CPHA=1 => Mode 1, W=RE R=FE (CLK inverted at each byte for un unknown reason) - CPOL=1 CPHA=0 => Mode 2, W=RE R=FE (CLK inverted at each byte for un unknown reason) - CPOL=1 CPHA=1 => Mode 3, W=FE R=RE Regards, Stany On Fri, Feb 18, 2011 at 3:49 PM, stefan harjes <[email protected]> wrote: > Hi, > > I am evaluating the FT4232H chip on the FT4232H Mini Module using libftdi. > > As described in the FTDI application note AN_114 and many other sources, there > are four SPI modes defined (four combinations of the two bits cpol and cpha). > > In the description of the MPSSE engine (AN2232-01 - Command Proc....) there > are only two SPI long (MSB) writes described (0x10 & 0x11 on page 7/8). > However, from my understanding there should be four modes (two for each > polarity). To make things worse, the combination which I appear to need > cpol=0, cpha=1 (=SPI mode 1) seems to be missing. > > To make things appear even foolish, page 15/16 of AN2232-01 describes two SPI > modes, which from my understanding do not exist (for example 0x30: out on > positive edge, in on positive edge). > > When I use a scope, no matter which write/read command I issue to the MPSSE > engine, I have not been able to get the SPI mode 1 (initial clock polarity 0, > data out on rising edge). > > Any hints would be appreciated, as I am out of ideas right now... > this likely renders the chip useless for my > application. > > Best > > Stefan > > > > -- > libftdi - see http://www.intra2net.com/en/developer/libftdi for details. > To unsubscribe send a mail to [email protected] > > -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
