MPC823: i2c-algo-8xx read interrupt?

bart at ardistech.com bart at ardistech.com
Tue Feb 12 02:45:21 EST 2002


Dan Malek wrote:

>
> How do you know when you have received the proper number of bytes?  Are we
> always changing the value of mrblr (I don't remember the code anymore)?
>
I knew about the TX counter being used for the number of RX'd bytes, but expected
the RX interrupt to be the last one, after the RX buffer was closed (This often
seems to be the case, as long as the RX interrupt does not dissapear).

>
> You could just poll the receive buffer for about two plus a little character
> times.  If you don't get the empty flag cleared in this time report some error.
>
I think that's the best solution.

> The interesting thing about any I2C controller is the overhead of trying to
> manage this thing is higher than just clocking bits in software.  I seldom
> use the I2C controller, just a few lines of C code to do the job. Think about it.
>
You're right, but spending XX$ on a fast PPC chip and after that let it run
busy loops to time the I2C control makes me feel bad :)

	Bart

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list