Other Parts Discussed in Thread: CC2541
Hi,
Currently I'm implementing I2C driver on CC2541.
And I saw that the driver may run smoothly several times (iterations, say 4-5 times)
and then (on next try) it waits for START condition
"while ((I2CCFG & I2C_SI) == 0);" (see code below)
too long, actually if I don't break it programmatically, the driver stack forever.
> #define I2C_STA BV(5)
> #define I2C_STO BV(4)
> #define I2C_SI BV(3)
>
> I2CCFG &= ~I2C_SI;
> {count++;
> if (count > 1000) break;
> }
> I2CCFG &= ~I2C_STA;
Why it may happen? - wrong frequency? low voltage? or something else?
All iterations in question are the same (like write a byte to an address, read several bytes).
Thank you.