Git Product home page Git Product logo

ds248x's People

Contributors

pilotak avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ds248x's Issues

waitBusy() operations are very slow

The waitBusy() function seems to be generating quite a bit of delay, to the point where it takes about a minute to discover 6 DS18B20s on a bus. I added the following debug to the waitBusy() function:

while ((buf[0] & DS248X_STATUS_1WB) && ((poll_count++) < DS248X_POLL_LIMIT))
{
_timer = GetMicroseconds();
_i2c->read(_address, buf, 1, buf[0] & DS248X_STATUS_1WB);
_timer = GetMicroseconds() - _timer;
tr_debug("wait time: %dus", _timer);
}

and I get the following kind of output during a search:

[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150400us
[DBG ][WIRE]: wait time: 86us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150381us
[DBG ][WIRE]: wait time: 109us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150403us
[DBG ][WIRE]: wait time: 86us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150381us
[DBG ][WIRE]: wait time: 112us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150403us
[DBG ][WIRE]: wait time: 112us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150380us
[DBG ][WIRE]: wait time: 108us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150404us
[DBG ][WIRE]: wait time: 109us
[DBG ][WIRE]: Sending[2]: 78:00
[DBG ][WIRE]: wait time: 150378us
[DBG ][WIRE]: wait time: 108us

It appears there are I2C reads taking over 150ms, which is quite long. I am running this on an STM32F103RB MCU. Why might this be taking so long?

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.