Comments (5)
Hi. I'm no expert, but I just happen to be reading about the FTDI chips this
week, and I ran across your question shortly after looking at this app note:
http://www.ftdichip.com/Support/Documents/AppNotes/AN_114_FTDI_Hi_Speed_USB_To_S
PI_Example.pdf - and I remembered running across this quote while I was reading
about their SPI support: "It is recommended that designers review the SPI Slave
data sheet to determine the SPI mode implementation. FTDI device can only
support mode 0 and mode 2 due to the limitation of MPSSE engine." Sorry to be
the bearer of bad news, but it sounds like this might not be fixable, at least
until they make some change to the MPSSE engine to address the problem. (or, I
guess, you might be able to do something in bit-bang mode, for a lot more work
and at a slower speed.) Good luck!
Original comment by [email protected]
on 7 Dec 2012 at 10:20
from libmpsse.
Hi.
I see... Thank you for pointing this out.
Maybe a note should be added to this library stating that only modes 0 and 2
are working properly...
Original comment by [email protected]
on 7 Dec 2012 at 10:27
from libmpsse.
Yes, the MPSSE engine only supports modes 0 and 2.
This library makes an attempt to support modes 1 and 3 in software, though as
you've seen in the comments/code/scope, it's a hack since the MPSSE engine
doesn't want to work properly in these modes. I've tested modes 1 and 3 against
the DS1305 real time clock chip successfully, and I've used mode 3 successfully
with various SPI EEPROMs and SPI flash chips, though YMMV. You can always use
the bitbang mode if necessary, but this will obviously be much slower.
I will add a statement to this effect in the documentation.
Original comment by [email protected]
on 9 Dec 2012 at 3:05
from libmpsse.
Hi,
It seems modes 1 and 3 will work correctly only with devices that support
instruction decoding "on the fly": that is, the instruction is executed -if
valid- as soon as it's loaded into the shift register, without waiting for CS
to go high.
Unfortunately, when you are communicating with SPI slaves that support
daisy-chaining, the execution of commands can only take place after CS is
removed. This ensures that the correct codes have been loaded throughout the
whole chain.
In this case an additional clock cycle is completely disruptive...
Devices that perform clock counting are also affected by this and will void the
transferred data every time.
Original comment by [email protected]
on 11 Dec 2012 at 4:04
from libmpsse.
Thanks pietro, I've updated the SPI README file as well as the summary on the
main project page to reflect the state of SPI 1/3 support.
Original comment by [email protected]
on 28 Jan 2013 at 6:46
- Changed state: Fixed
from libmpsse.
Related Issues (20)
- WritePins always fails HOT 2
- Patch for /trunk/src/mpsse.i HOT 1
- make install command does not work at MinGW
- Failed to initialize MPSSE: device not found
- Erronous start condition if using GPIO on low bits in i2c mode
- pyswig versions of functions leaked into C library (libmpsse.a/.so)
- FastTransfer always fails
- Problems with the Setup
- How to address i2c slaves HOT 1
- I2C Read gives one bad bit, but only rarely
- SetDirection in MPSSE mode
- FIXED Apple OS X library compilation and installation with libftdi1 from MacPorts
- where is pylibmpsse ? HOT 1
- I2C eeprom python script available HOT 1
- Patch for /trunk/src/mpsse.c
- Different names of values in examples/spiflash.py
- i2c ACK bit not read properly
- trouble running spiflash -p (likely an install issue)
- SPI_ReadWrite returned unexpected result HOT 2
- open usb-serial port
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmpsse.