- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks boont, but the document is no help to my question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.