Giter Club home page Giter Club logo

Comments (5)

JeremyGrosser avatar JeremyGrosser commented on May 30, 2024

I have a fix, but I'm afraid it might break other I2C devices. Please test out the https://github.com/JeremyGrosser/rp2040_hal/tree/issue_49 branch and let me know if it solves your problem.

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

Thanks I will look at it as early as I can. Currently my work bench has another project so maybe next weekend

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

i checked and the behaviour did not improve, same separation of the address still there. When I remember correctly, pico_bsp 1.6.0 worked fine with 16 bit addresses, not sure what you changed in the i2c code. I will try to spend more time, but at the moment I have a different project going.

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

I had some time to debug in the libraries. I am not sure, if this helps, what I write below.
My view is, that if I call a procedure multiple times with the very same parameters, then the behaviour should be the same.
I found the following using the code above.

The first time I call Port.Mem_Write on line 49, I found out, that in the procedure RP.I2C.Write the flags for:

P.IC_DATA_CMD :=
         (RESTART => (if This.Repeated_Start and P.IC_DATA_CMD.FIRST_DATA_BYTE = ACTIVE then ENABLE else DISABLE),
          STOP    => (if not This.Repeated_Start and This.TX_Remaining = 1 then ENABLE else DISABLE),
          CMD     => WRITE,
          DAT     => Data,
          others  => <>);

result in:

P.IC_DATA_CMD :=
         (RESTART => DISABLE,
          STOP    => DISABLE,
          CMD     => WRITE,
          DAT     => Data,
          others  => <>);

The second time I call Port.Mem_Write on line 89, I found out, that in the procedure RP.I2C.Write the flags for:

P.IC_DATA_CMD :=
         (RESTART => (if This.Repeated_Start and P.IC_DATA_CMD.FIRST_DATA_BYTE = ACTIVE then ENABLE else DISABLE),
          STOP    => (if not This.Repeated_Start and This.TX_Remaining = 1 then ENABLE else DISABLE),
          CMD     => WRITE,
          DAT     => Data,
          others  => <>);

result in:

P.IC_DATA_CMD :=
         (RESTART => ENABLE,
          STOP    => DISABLE,
          CMD     => WRITE,
          DAT     => Data,
          others  => <>);

As written above, not sure if this helps, but even having the very same parameters in both calls, I would not expect, that those flags are different.
Maybe this is a hint for you.

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

I would like to offer to send you EEPROMS like the ones I use:
https://www.mouser.com/ProductDetail/Microchip-Technology/24FC64F-I-P?qs=WqWCsLCZBkoe3htI4nCQOg%3D%3D
and ship it to your private address if this helps to debug. Let me know.

from rp2040_hal.

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.