Giter Club home page Giter Club logo

Comments (3)

ijager avatar ijager commented on August 20, 2024 1

I was just getting ready to tackle this issue, so I did a git pull and turns out it is already fixed 😃
Thanks @andresv, I just tested it and it also works with optimizations on now

from stm32g0xx-hal.

ijager avatar ijager commented on August 20, 2024

Just tested 9697aef and it is not fixed yet.

For now I need to add a 'timeout' to the busy_wait loops

 ($i2c:expr) => {
        let mut count = 0;
        loop {
            let isr = $i2c.isr.read();
            if isr.berr().bit_is_set() {
                $i2c.icr.write(|w| w.berrcf().set_bit());
                return Err(Error::BusError);
            } else if isr.arlo().bit_is_set() {
                $i2c.icr.write(|w| w.arlocf().set_bit());
                return Err(Error::ArbitrationLost);
            } else if isr.nackf().bit_is_set() {
                $i2c.icr.write(|w| w.nackcf().set_bit());
                return Err(Error::Nack);
            } else if isr.busy().bit_is_clear() {
                break;
            }
            count += 1;
            if count > 1000 {
                break;
            }
        }
    };

I'll try to look into it further soon

from stm32g0xx-hal.

andresv avatar andresv commented on August 20, 2024

Yes, I have the same problem.

At some point stuff from L0 https://github.com/stm32-rs/stm32l0xx-hal/blob/master/src/i2c.rs should be merged.
G0 and L0 are quite similar. However G0 uses modern DMAMUX.

from stm32g0xx-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.