From: George F. <cha...@gm...> - 2006-03-21 18:10:09
|
Hi Dave, Yeah, pics and AVR's are going to be very similar, in that they both have a hardware module. I've not tried the 2.6.15 kernel yet, but the old 2.6.11 one has never gone unstable on me, and I've dropped the power to the pic on numerous occasions (pull-ups on the pic side, so bus will go low with the pic power. I wouldn't try to stretch the clock that far, I find it easier just to return zero's from the pic until it's real data is ready, so the gumstix can poll the pic in a loop until it gets what it wants. You usually finish up writing a little comms protocol when talking I2C :) Bye for now, George. On 21/03/06, Dave Hylands <dhy...@gm...> wrote: > HI George, > > On 3/21/06, George Francis <cha...@gm...> wrote: > > If the pic stretches the clock for a long time, the gumstix driver > > will time out. In my experience, a pic is way faster than I2C > > signals, it will go in and out of the interrupt routine well within a > > bit-period. If the clock is staying low, I'd suggest there's a > > problem with your pic code, its not releasing the clock when it > > should. > > Matthew mentioned that he had a SW problem in an earlier email. I'm > not that familiar with the PIC, but on the ATMega AVR's that have > TWI/I2C support, the hardware will do automatic clock stretching. > > When the interrupt service routine is called, the clock will be > stretched until the ISR returns (during a data transfer). This is > useful if your code is say writing flash (which the bootloader does) > and writing flash involves a > read-page/erase-page/modify-page/write-page which can take a few > milliseconds. > > The SMBus specification allows for 35 msec of clock stretching. The > I2C spec doesn't impose any limits. > > Leaving the bus in an unusable state is one of the weaknesses of i2c, > and is one of the reasons that it tends to be used for very short > localized communication (typically measured in a very small number of > inches). > > -- > Dave Hylands > Vancouver, BC, Canada > http://www.DaveHylands.com/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |