Giter Club home page Giter Club logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
No, I selectively added your changes. :)

Original comment by [email protected] on 8 Jul 2012 at 11:24

from libmpsse.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 18, 2024
Awesome, thanks for verifying!

Original comment by [email protected] on 13 Jul 2012 at 8:08

  • Changed state: Verified

from libmpsse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.