Comments (11)
The device in question is:
http://ww1.microchip.com/downloads/en/DeviceDoc/22059b.pdf
Original comment by [email protected]
on 17 May 2012 at 4:01
from libmpsse.
I suppose one way it could work is to allow you to transmit something other
than 0xFF0xFF on the read... I.E. instead of sending junk, send a command with
the read... But I don't know if that really fixes the problem since I'm not as
familiar with the libftdi API. It didn't seem like it would let you actually
send anything during a read, but maybe another API command to fix that? Or
modify what is there (that would probably break a lot of projects though).
Original comment by [email protected]
on 17 May 2012 at 4:33
from libmpsse.
This is my patch for the problem. You can take a look at it. Maybe you can
even clean it up and make it work a little better. It doesn't always flush the
buffer properly. This is a problem if you use this code with the FT2232D
because you get two errors right off because the library always sends two
commands that the FT2232D doesn't support. I guess if you detected the chip,
there might be a way to fix this, but as it is, it isn't a showstopper. It
just means you need to read before you send your first WriteRead command.
Original comment by [email protected]
on 18 May 2012 at 12:03
Attachments:
from libmpsse.
Thanks roboknight, I've checked in your changes to the trunk along with a few
bug fixes. It works as long as there are no large data transfers (several MB,
for example). For large transfers it sometimes works, sometimes doesn't, so
I'll need to look into that.
I don't have a 2232D on hand; do you remember off hand which two commands were
not supported? I suppose I could go look up the supported commands in the data
sheet... :)
Original comment by [email protected]
on 8 Jul 2012 at 3:22
- Changed state: Started
from libmpsse.
I'd have to look, but basically it is some initialization that is supported
with the H... I'll run it monday again and see what is going on with it.
btw, it sounds like you perused those changes. I wanted to mention (hopefully
you left *THESE* out) that there might have been some "example" changes in
there that *SHOULDN'T* make it into the trunk. That was just me hacking up the
example to work with my device.
Original comment by [email protected]
on 8 Jul 2012 at 5:17
from libmpsse.
No, I selectively added your changes. :)
Original comment by [email protected]
on 8 Jul 2012 at 11:24
from libmpsse.
You asked which commands failed:
If you open a 2232D using something like --
from mpsse import *
a = MPSSE(SPI0, ONE_MHZ, MSB)
You can immediately do a read like this:
a.Read(4)
and you'll find this:
'\xfa\x8b\xfa\x97'
The \xfa indicates the error, the command follows. So the commands are
0x8b and 0x97
0x97 -- Disable adaptive clocking (the 2232D doesn't have RTCK)
0x8b -- TCK_D5 (which I also think is out of scope for the 2232D)
At any rate, it basically leaves that in the buffer.
Original comment by [email protected]
on 10 Jul 2012 at 11:23
from libmpsse.
Ah, that'll do it. I just checked in a change that purges the buffers after set
up, so any errors should be cleared out.
I don't have a 2232D ATM, but I tested by intentionally sending bad commands to
the chip and verifying that this fix cleared the errors out of the receive
buffer. Let me know if this fixes things for you.
Original comment by [email protected]
on 11 Jul 2012 at 2:53
from libmpsse.
Tested it with the 2232D. Works fine now. Or at least the errors are cleared.
Thanks.
Original comment by [email protected]
on 12 Jul 2012 at 7:34
from libmpsse.
Oh, and I forgot to mention your Transfer(...) function works really well. So
you can probably close this.
Original comment by [email protected]
on 12 Jul 2012 at 10:02
from libmpsse.
Awesome, thanks for verifying!
Original comment by [email protected]
on 13 Jul 2012 at 8:08
- Changed state: Verified
from libmpsse.
Related Issues (20)
- I2C Read is not working for me HOT 2
- Unable to build out-of-source HOT 4
- PATCH: multiple deive support
- 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
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.