Hello everybody,
i use the I2C0 module in the L138 (actually AM1806) in master mode to access some peripheral ICs
(the I2C0 module is clocked with 25MHz, the ARM is clocked with 175MHz).
Up to now i have implemented it quick-and-dirty without interrupts, but with some wait loops, etc.
I want to make sure that, before i programm a new data transfer, the old data transfer is finished, so i am allowed to trigger a new data transfer.
Reading the ARDY bit in ICSTR doesn't help, because it seems to be invalid after programming the stop condition of the last transfer.
Reading the BB bit of the ICSTR doesn't work for me neither, because it seems that the ARM core goes on to fast, after i detect BB==0.
Using the ICRRDY and ICXRDY of the ICSTR also doesn't help. Bit if i try to initiate a new transfer without any wait, my system will hang.
Could this be a problem regarding the two different clock domains (ARM is too fast) ?
So how can i make sure, the I2C0 peripheral is ready for programming a new transfer?
Are there code examples availabe? (best would be with INT usage, or even with INT and DMA usage)
Thanks a lot in advance!! :-)
Al