Hello,
I've a couple of questions related to the I2C on the OMAP-L137.
On the ARM side of the OMAP the following version are used:
- DSP/BIOS Version: 6.21.03.21
- CCS Version : 4.1.3.00038
In december a new user guide "TMS320C674x/OMAP-L1x Processor Inter-Integrated Circuit (I2C) Module UG (Rev. B)" has been released by TI (sprufl9b).
In addition to the previous version the I2C DMA Control Register (ICDMAC) was added.
The new register has two bits (TXDMAEN/ RXDMAEN), value after reset is "1" for each bit, which means: DMA transmit/receive event is enabled.
Furthermore the description (see section 3.25) for both bits state: Always set this bit to 1.
Q1: Why must these bit always be set to "1"?
Q2: What happens if these bits were set to "0"?
Another item I like to address:
In our application a device is connected via IC2 as slave, the OMAP-L137 (ARM) is the I2C master.
To read a byte out of this device the following sequence must be performed:
START - write device addr (8 bit, e.g. 0x50) - SACK - write instruction (8 bit, e.g. 0x92) - SACK - read data from device (8 bit) - MACK - STOP
START: Start Condition
SACK : ACK from Slave
MACK : Ack from Master
STOP : Stop Condition
I tried to use the "Free data format mode" and it looks, that I cannot read data from the slave device.
Scope measurements showed, that the I2C device on the OMAP stops sending out clock singal after transmitting the first two bytes (ICCNT was set to 2).
I got only two interrupts in ICIVR:
- Transmit-data-ready interrupt (ICXRDY), after the first byte is transmitted
- Register-access-ready interrupt (ARDY), after the second byte is transmitted
Experimental I tried to transmit 3 bytes to extend the clock signal, however then I got an Arbitration-lost interrupt (AL) in ICIVR and
the I2C Data Receive Register (ICDRR) does not contain the expected value.
Section 2.6.3 in sprufl9b states "... and the direction of the data must be constant throughout the transfer."
Q3: Does this statement mean that I can not perform the above sequence (as the TRX bit of ICMDR is changed from transmitter mode to receiver mode)?
Q4: Any ideas how to accomplish the above sequence on the OMAP-L137 resp. what could be wrong?
Thanks,
Frank