Giter Site home page Giter Site logo

Erroneous clock frequency about libmpsse HOT 8 OPEN

devttys0 avatar devttys0 commented on August 17, 2024 1
Erroneous clock frequency

from libmpsse.

Comments (8)

l29ah avatar l29ah commented on August 17, 2024

Check that your logic analyzer measures periods correctly. I had similar problems with another FX2-based LA that lied to me.

from libmpsse.

andreireanu avatar andreireanu commented on August 17, 2024

Thanks for the reply! The thing is I used a different library at some point (pyftdi) and the real frequency was recorded correctly by the analyser, so I don't think there's an issue with it.

from libmpsse.

l29ah avatar l29ah commented on August 17, 2024

Oh, interesting. By the way, on your screenshot i observe clock blanks being twice as long as the pulses; is it the same with pyftdi?

from libmpsse.

andreireanu avatar andreireanu commented on August 17, 2024

Nope, the blanks were the same size as the ones.

Screenshot from 2020-04-09 13-38-46

from libmpsse.

andreireanu avatar andreireanu commented on August 17, 2024

I seem to have found the problem:

To make I2C working, FTDI needs to enable what they call a "3 phase clock". PyFtdi implements this feature. The issue with this mode is that it requires 3 clock phase for each clock period, hence the 2:3 ratio. PyFtdi hides this setting from the user, and silently tweaks the specified clock to match what the users expects. libmpsse seems not to do it.

Is anyone aware of the inner working of the libmpsse library and how I could make this change to it? Thanks!

from libmpsse.

l29ah avatar l29ah commented on August 17, 2024

from libmpsse.

l29ah avatar l29ah commented on August 17, 2024

Also i see it being enabled in SetMode().

from libmpsse.

andreireanu avatar andreireanu commented on August 17, 2024

Can you please be more specific on where I can find this part of code? I searched for the definitions of the frequency constants and this led me to the compiled _pylibmpsse.so file.

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.