Comments (5)
Can you please provide more information on the bug, such as:
o What FTDI device are you using with libmpsse?
o What I2C device are you communicating with?
o How do you have your I2C device connected to the FTDI chip?
o Have you tested and verified that the start condition did not work prior to your patch and that it does work after applying your patch?
Considering that the I2C clock and data lines are part of the low 8 bits on the
FTDI chip's MPSSE bus (reference: FTDI Application Note 135), I don't see how
applying changes to the high 8 bits would provide proper control over the I2C
pins. Additionally, I have used libmpsse in its current configuration to
communicate with I2C devices before, so I can verify that the current
implementation of the Start() method is functioning properly for me.
Original comment by [email protected]
on 19 Sep 2012 at 1:38
from libmpsse.
FTDI chip: FT2232H
Target I2C device: micro controller (it supports EEPROM like accessing)
Connection: FTDI device channel A and MCU are connected directly.
MCU SCL - FTDI TCK/SK(16)
MCU SDA - FTDI TDI/DO(17) & TDO/DI(18)
(SCL and SDA lines are pulled-up to 3.3V)
I have to say sorry that the patch was incorrect.
It breaks a repeated start condition.
Attached files are test code and captured waveform.
Original comment by [email protected]
on 20 Sep 2012 at 1:29
Attachments:
from libmpsse.
Ah, a picture is worth a thousand words; sorry, I thought you were having
problems with speaking I2C to a particular device.
This is a known issue, although it *shouldn't* cause problems with I2C
compliant devices.
The extra low clock output that you're seeing is performed in order to
absolutely ensure that the SDA and SCL lines are in their expected states prior
to issuing a repeated start condition (the Start() function is used for both
starts and repeated starts). If a start condition has not been previously
issued, the clock toggle will be ignored by I2C devices on the bus anyway, and
if it has then this will be seen as a repeated start condition. However, it
does look odd on the 'scope and is an undesirable side-effect.
After some thought, I think there is a simple fix for this that doesn't break
repeated start conditions, but I'll have to wait until I get home tonight to
test it and check it in.
Original comment by [email protected]
on 20 Sep 2012 at 2:55
- Changed state: Started
from libmpsse.
Just checked in a patch that removes the extra clock toggle on a start
condition, but preserves the expected behavior for a repeated start condition.
Original comment by [email protected]
on 21 Sep 2012 at 3:04
- Changed state: Fixed
from libmpsse.
Thank you for your quick work.
Latest code on repository works perfectly!
Original comment by [email protected]
on 21 Sep 2012 at 4:17
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.