[bcm20732] i2c question

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi Sirs,

We use a i2c bus chip that need to wake up it.

The wake up is to make SDA pin low for at 60us and high for 2.5ms.

screenshot.png

What I want to do is to use i2c_write() and delay function to match the waveform.

The example code as following:


     /* wakeup chip, 60us is required */

     i2cm_write(NULL, 0, 0x00);       -> can I use this function in such kind of way?

     /* a delay function is required here */

     delay_ms(3);

Or do you have any suggestion?

For example: to quickly switch from GPIO to I2C?

0 Likes
1 Solution
Anonymous
Not applicable

Does the chip have to be waken up by I2C SDA line?

I'm not sure whether i2cm_write works with 0byte data.

You can try and check it by an oscilloscope.

When the clock is 100k, tWLO will be about 80us.

View solution in original post

4 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

I suggest that you refer to this document "wiced smart hw interfaces" that is available for download on this forum. The mechanics of i2c as well as a master-role sample code is documented in it.

0 Likes
Anonymous
Not applicable

Thanks boont, but the document is no help to my question.

0 Likes
Anonymous
Not applicable

Does the chip have to be waken up by I2C SDA line?

I'm not sure whether i2cm_write works with 0byte data.

You can try and check it by an oscilloscope.

When the clock is 100k, tWLO will be about 80us.

Anonymous
Not applicable

Yes, the chip have to be waken up by I2C SDA line.

The i2cm_write(NULL, 0, 0x00) doesn't work, system hang. But if I give a dummy data ex i2cm_write(&var, 1, 0x00), it can be waken up. Interesting.


0 Likes