I2C Timeout

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

gwh
Posts: 9
Joined: Wed Apr 28, 2010 3:30 pm

Re: I2C Timeout

Post by gwh »

I don't know if it is a strange place or not - but it is where Microchip does its clock stretching in hardware. Attached are two pages (in zipped pdf) from the Microchip data sheet showing the I2C waveform with clock stretching.
I2C Clock Stretch Microchip.zip
(54.37 KiB) Downloaded 698 times

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: I2C Timeout

Post by xol »

Hi,
So have my last firmware worked?

gwh
Posts: 9
Joined: Wed Apr 28, 2010 3:30 pm

Re: I2C Timeout

Post by gwh »

Just checked it out. Your latest fix seems to take care of a short clock stretch (22mS), but not a long clock stretch (1000mS). The SUB-20 GUI seems to return the error message very quickly.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: I2C Timeout

Post by xol »

Hi.
I have increased it to something about 2sec
Please try it.
Attachments
sub20-0.2.4-I2CTO3.INC
(48.19 KiB) Downloaded 708 times

gwh
Posts: 9
Joined: Wed Apr 28, 2010 3:30 pm

Re: I2C Timeout

Post by gwh »

I tried your latest and found that it also does not work for me. When I checked the most recent waveform, the clock stretch was over 2 seconds (due to changes in the hardware that had to be compensated for in I2C firmware).
So if you could provide a version that provides for 5 seconds of clock stretch (as originally mentioned), that should take care of my needs.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: I2C Timeout

Post by xol »

Well you are tough guy.
I will prepare and post soon over 5sec delay version.

xol
Site Admin
Posts: 241
Joined: Sat Aug 29, 2009 8:04 am

Re: I2C Timeout

Post by xol »

Here it is.
Please let me know how it worked this time.
Attachments
sub20-0.2.4-I2CTO4.INC
(48.22 KiB) Downloaded 715 times

gwh
Posts: 9
Joined: Wed Apr 28, 2010 3:30 pm

Re: I2C Timeout

Post by gwh »

This seems to work now in my application. - Thanks.

Post Reply