Skip to content

SCL pin held LOW #4

@chripink

Description

@chripink

Hi,

I'm using your library with a BeagleBone Black and I encounter an issue.
When I communicate with the attiny85, at a certain moment on the i2c communication, the SCL pin it held LOW by the software. The problem is that the linux embedded on the beaglebone expect some CPU LOCKED because of that.
The issue is appening some times at 100kHz but every times at 400kHz. Here is the scopes mesures to let you know what I mean :
Here is the first frame of the i2c detect command

  1. The Attiny85 is erease, all other i2c devices are detected, i2c 100kHz
    sds00004
  2. he Attiny85 is erease, all other i2c devices are detected, i2c 400kHz
    sds00005
  3. The Attiny85 is programmed, you software is working and is detected at the 0x40 address but you can see something strange on the two last SCL pulses. Sometimes the linux expect a CPU LOCK, i2c 100kHz
    sds00003
  4. The Attiny85 is programmed, you software is running makes the linux expect a CPU LOCK at each i2cdetect command. You can see the SCL line held LOW for a while, i2c 400kHz
    sds00002

I see on you code that you activate the USIWM0 and USIWM1 from the USICR register to 1.
We can read in the datasheet for USIWM0 and USIWM1 set to 1:
"Two-wire mode. Uses SDA and SCL pins.
Same operation as in two-wire mode above, except that the SCL line is also held low
when a counter overflow occurs, and until the Counter Overflow Flag (USIOIF) is cleared"

Please can you help me for this issue ?

Thank you,
Christophe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions