Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 3.1, i2c and raspberry pi (4)

  1. #1

    Teensy 3.1, i2c and raspberry pi (4)

    Hi,

    The raspberry pi (at least version 3 and older) has this problem with clockstretching in i2c. Communication then doesn't work with the avr arduino (maybe other arduinos as well, have not tried yet).
    Now I'm looking for an MCU that can be programmed in the Arduino environment (because of availability of all those libraries) with which i2c to the raspberry pi works fine (note: HARDWARE i2c, not the software/emulated i2c).
    Is this possible with Teensy 3.1?

    Regards

  2. #2
    Never mind, I should've done more googling first.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,828
    In case anyone finds this question later by search, I2C clock stretching is supported on all Teensy 3.x and 4.0 boards.

    But there is a timeout which limits the maximum clock stretch, so a hung or crashed I2C device can't cause your program to stall indefinitely.

  4. #4
    Quote Originally Posted by PaulStoffregen View Post
    In case anyone finds this question later by search
    Good point.

    I'd like to add that i2c with RPI 3 and earlier probably won't work due to the clock-stretching, but from what I've heard (but not verified yet) the rpi4 should be fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •