-
Notifications
You must be signed in to change notification settings - Fork 5
Description
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
- The Attiny85 is erease, all other i2c devices are detected, i2c 100kHz
- he Attiny85 is erease, all other i2c devices are detected, i2c 400kHz
- 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
- 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
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