From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

8452 I2C Clock Streching

Solved!
Go to solution

 

Hi,

 

We are looking to emulate a I2C sensor that is doing clock streching while doing his measurement. Does the NI-USB-8452 support clock streching in slave mode ?

 

Thank you 

0 Kudos
Message 1 of 4
(5,177 Views)
Solution
Accepted by topic author blanchards

Hi Blanchards,

 

Our 845x manual states that "the I2C specification provides a mechanism to allow the slave to slow down the bus traffic when it is not ready.  This mechanism is known as clock stretching." Additionally, it states that the behavior is different if the device is in High Speed mode. The USB-8452 is built in accordance with that specification. Therefore, we can conclude that it does clock stretching when necessary.

 

There is an example of the NI-8452 doing clock stretching in the following forum post: http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Use-NI-8452-be-a-Slave-device-in-SMBUS-NI-845...

 

Please note that the USB-8452 supports the following (as defined in I2C 4.0 specifications):

 

1. Standard mode

2. Fast mode

3. Fast mode Plus

4. High Speed mode

 

The manual I referenced can be found at the following URL: http://www.ni.com/pdf/manuals/371746e.pdf

 

Regards,

 

Kyle S. 
Applications Engineer
National Instruments
http://www.ni.com/support

 

 

 

Message 2 of 4
(5,150 Views)
Solution
Accepted by topic author blanchards

The 8452 as a slave in general ALWAYS does clock stretching. This is how we allow you to respond in real time (vs a predefined buffer). We notify the host of the request and start the stretch. Once the host replies with the requried data the stretch is removed and the data is placed on the bus.

Message 3 of 4
(5,141 Views)

Thank you

0 Kudos
Message 4 of 4
(5,044 Views)