Hi,
I am running uClinux on an MCF5373L, extensively using I2C.
I am using uClinux-dist-20071107 with linux-2.6.23-uc0.
First, I was wondering why there are no error messages when the
slave does not send an acknowledge. I fixed this in my copy by
changing the last lines of the functions coldfire_write_data and
coldfire_i2c_start as follows:
#if 0
if (timeout <= 0 )
#else
if ((timeout <= 0 ) || (*MCF_I2C_I2SR & MCF_I2C_I2SR_RXAK))
#endif
return -1;
else
return 0;
The clock speed is set to around 90 kHz (80 MHz bus speed and 0x3A in I2FDR).
Now I still have the problem that from time to time, the I2C bus gets
stuck and I can only revive it by resetting the processor (because
I did not find out what exactly happens). The error message is
coldfire_i2c_start - I2C bus always busy in the past 500us timeout is -1
I tried re-calling the hardware init part of i2c_coldfire_init in this
case (everything in i2c_coldfire_init except i2c_add_adapter), but it
does not help. In this state, both lines are in high-state.
Once there was also a different error message, but I was too slow to copy
it out of my terminal.
The speed is set to 90 kHz, devices on the bus are 2 * STB0899, 3 * LM75,
MAX3353, 2 * TSA5059, 2 * PCF8574A and an FPGA with I2C slave. Rise
times look OK with the scope (around 0.8 us).
So my questions:
- is the missing NACK error handling caused by some hardware limitations
on other Coldfire family members, or could it be generally implemented?
- did anybody else experience these strange I2C problems?
Regards,
Wolfgang
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev