I2C read and write without stop condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 06:15 AM
Using the HAL I2C library, is there any way to generate a continuous stream of scl and sda without a stop bit after the chip address acknowledge and data acknowledge. Otherwise I am planning to use a i2C bitbang library any recommendations? The target chip that I am using does not like the marked segment below
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32Cube MCU Packages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 10:19 AM
I second @Harvey White​ the rise and specially fall rates on the clock look way too slow. The falling edge should be pretty close to a vertical line. That said, it doesn't look like the slow clock edges overlap changes in SDA.
The voltage level at the address ACK bit is messed up. And you can see how the two little peaks just cross the logic analyzer digital thresholds to give you the two narrow pulses on the digital SDA line. While the "digital" representation shows ACK for the address byte, looking at the analog version I would not be so sure.
Figure out why you aren't getting a good low/high value for the address ACK. What value pull-up resistors do you have on the I2C bus? Are there resistors on your device's eval board AND on your STM32 board? Are you pulling it to 5V or 3.3V?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 10:32 AM
Just saw your OTHER post about 1.1V I2C levels here https://community.st.com/s/question/0D53W00001M8LwmSAF/i2c-operating-voltages
As mentioned in that thread, you need a level shifter. Also, your pull-up resistor value to the 1.1V supply is too large. The actual value depends on your clock speed and bus capacitance. The I2C spec (NXP UM10204) gives equations for this. Ignoring capacitance and allowing for the standard 3mA current when the line is pulled low, 367 ohms to 1.1V would be the highest usable value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 10:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 10:51 AM
Or you're using a 3.3V logic level chip with a 1.1V one, which won't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-08 11:26 AM
useful notes:
- A single message can contain multiple START conditions. The use of this is so-called “repeated START�? is common in I2C.
- STOP condition always denotes the end of the transmission even if it is issued in the middle of the transaction or the middle of a byte.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-23 03:12 PM
Hello all,
Thank you for the replies and I finally got some updates and was finally able to get back to this. I agree with everyone that the problem was with the level translation. I was able to resolve it. I ended up using a PCA9517 level converter. Worked very well. I also reduced the clock rate to 20kHz and since I was going through bread boards and hook up wires. My outputs were much cleaner. Thank you everyone.
- « Previous
-
- 1
- 2
- Next »