energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
795 stars 671 forks source link

Implement I²C Clock Stretching on the Stellaris / Tiva C #346

Closed rei-vilo closed 10 years ago

rei-vilo commented 10 years ago

From http://github.com/energia/Energia/issues/336

The I²C specifications (NXP, I²C-bus.org) allow the slave to set the SCL clock line low to make the master wait. This is called clock streching.

An I2C slave is allowed to hold down the clock if it needs to reduce the bus speed. The master on the other hand is required to read back the clock signal after releasing it to high state and wait until the line has actually gone high.

How to implement clock stretching on the Stellaris LM4F120 / Tiva C TM4C123?

For example, the twi.h library for the MSP430 includes two functions that are used for this purpose:

void twi_stop(void);
void twi_releaseBus(void);

Thank you!

alfh commented 10 years ago

Isn't this just a duplicate of issue #336 ? If so, I think this issue should be closed, to avoid duplicates.

rei-vilo commented 10 years ago

You're right. Marked as duplicate and closed.