Giter Site home page Giter Site logo

TWI::Slave broken about cosa HOT 12 CLOSED

dothebart avatar dothebart commented on August 15, 2024
TWI::Slave broken

from cosa.

Comments (12)

mikaelpatel avatar mikaelpatel commented on August 15, 2024 4

After reviewing the changes after the low power support the issue seems to be the missing powerup() in TWI::Slave::begin.

from cosa.

dhillondeep avatar dhillondeep commented on August 15, 2024 2

@Mogball you can add those modules if you want rn. I will add some when I have more time

from cosa.

dhillondeep avatar dhillondeep commented on August 15, 2024 1

@Mogball We had this issue as well rmr

from cosa.

dhillondeep avatar dhillondeep commented on August 15, 2024 1

@shahzadlone tried to fix the commit 173c3eb and he made changes committed here on this commit.

void
TWI::isr_stop(State state, uint8_t type)
{
  TWCR = TWI::STOP_CMD;
  loop_until_bit_is_clear(TWCR, TWSTO);
  if (UNLIKELY(state == TWI::ERROR_STATE)) m_count = -1;
  m_state = state;

  // Check for asynchronous mode and call completion callback
  if (m_dev->is_async() || m_status == SR_STOP) {
    m_dev->on_completion(type, m_count);
    // m_dev = NULL;
    m_busy = false;
    // TWCR = 0;
  }
}

This seems to fix the issue and the slave starts to work but, slave breaks again on the commit a0d6795 where support for low power mode was improved. Can you suggest what we should look into for a potential fix?

from cosa.

shahzadlone avatar shahzadlone commented on August 15, 2024 1

You are right @mikaelpatel that seemed to have fixed it. I will be putting all these bug fixes in and then open a pull request.

from cosa.

dhillondeep avatar dhillondeep commented on August 15, 2024 1

@dothebart I do not think there is such a list. So I ended up creating a list and you can add to it https://github.com/dhillondeep/cosa-projects

from cosa.

Mogball avatar Mogball commented on August 15, 2024 1

What about our sensor modules? :P not just our build tools

from cosa.

mikaelpatel avatar mikaelpatel commented on August 15, 2024

Yes, the update to the TWI event handling has broken the TWI::Slave implementation. Busy right now but should get time to check the details in a few weeks. Thanks for the reporting.

from cosa.

Mogball avatar Mogball commented on August 15, 2024

Yeah we aren't to receive events either

from cosa.

mikaelpatel avatar mikaelpatel commented on August 15, 2024

Please see commit 2b07bd6.

from cosa.

dothebart avatar dothebart commented on August 15, 2024

btw, is there a list of opensource projects using cosa? Probably @dhillondeep could add an item to it? ;-)

from cosa.

shahzadlone avatar shahzadlone commented on August 15, 2024

This should now be fixed.

from cosa.

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.