8 Jul 2008 17:10
Re: mistake the i2c_bitbang direction
KIYOHARA Takashi <kiyohara <at> kk.iij4u.or.jp>
2008-07-08 15:10:36 GMT
2008-07-08 15:10:36 GMT
Hi! also port-powerpc guys, First, please see this thread at current-users <at> . http://mail-index.netbsd.org/current-users/2008/07/07/msg003400.html And, I will not understand the specification of i2c. From: Izumi Tsutsui <tsutsui <at> ceres.dti.ne.jp> Date: Tue, 8 Jul 2008 04:25:12 +0900 > > > I think mistake to set the direction. We necessary DIR(INPUT) before READ, > > > and DIR(OUTPUT) before SETBITS(). > > > > No. > > > > DIR() should be used only for SDA, not for SCL. > > As I noted in the log message, using DIR(INPUT) to read SCL > > in i2c_wait_for_scl() causes unexpected stop condition > > in SCL=H, SDA=L and DIR(OUTPUT) case. > > Furthermore, we have to do SETBITS() before DIR(OUTPUT) in some case > otherwise the device might put unexpected glitch during delay between > DIR(OUTPUT) and SETBITS(). I think that the following correction is necessary for gpiic of 405Gp of imb4xx if his correction is correct. Index: gpiic_opb.c ===================================================================(Continue reading)
RSS Feed