Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TLA2024: TLA2024 I2C communication failed

$
0
0

Part Number:TLA2024

Hello,

I am using TLA2024 to implement some external input DC signal sampling, but the 1st step that debugging I2C communication has blocked me.

I used TI MCU MSP430F5438A to control this component, the MCU also controlled other 2 I2C components and these 2 components now are working well. The 3 I2C components are connected 3 different I2C bus, the already work well I2C components occupied UCB1 and UCB3, the TLA2024 occupy UCB2.

I did same I2C registers configuration for 2 I2C components, but this TLA2024 cannot complete a start operation. Below are the register setup SW codes,

***********************************************

/* I2C register configuration */

UINT8 i;

P9DIR |= 0x06;     //P9.1 UCB2SDA, P9.2 UCB2SCL


P9OUT |=0x06;   // pull SCL and SDA pins up and low before set to I2C function 
for(i=0;i<20;i++)
{
}
P9OUT &=~0x06;
for(i=0;i<20;i++)
{
}


P9SEL |= 0x06;           // Assign I2C pins to USCI_B2


UCB2CTL1 |= UCSWRST;
UCB2CTL0 = UCMST + UCMODE_3 + UCSYNC;       //I2C Master, synchoronous mode
UCB2CTL1 = UCSSEL_2 + UCSWRST;                        //SMCLK, enable SW reset

UCB2BR0 = 0x32;             // SMCLK/50(0x32)=80kHz(do no exceed 400kHz)
UCB2BR1 = 0;

UCB2I2CSA = 0x48;           //Slave ADC(TLA2024) Addr:100 1000(D/C = 0)

UCB2CTL1 &= ~UCSWRST;

UCB2IE |= UCTXIE+UCRXIE;            //Enable RX TX interrupt

for(i=0;i<100;i++)
{
}

/* start transfer data */

UCB2CTL1 |= UCTR; 

while (IIC2_Start());

And then put data into UCB2TXBUF when TX buffer empty, did not paste all codes here.

/* sub-functions */

UINT8 IIC2_Start(void)
{
UCB2CTL1 |= UCTXSTT;                 // I2C start condition      (NOTE 1)
return(UCB2IFG & UCNACKIFG);
}

********************************************************************************

The problem occur when executing trigger start condition command at (NOTE 1)  Before execute this command the UCB2CTL0 = 0x0F, and UCB2CTL1 = 0x90 as the other 2 I2C components, but after this command, the other 2 I2C component's UCB2CTL1 will change to 0x92, that means the start condition is complete succeful, but the TLA2024's UCB2CTL1 still is 0x90, and then there will be a dead loop in the sub-function IIC2_Start().

The hardware design was intended to power TLA2024 to +5V, with a +5V to +3.3V I2C bus bridge to MCU, now has connect TLA2024 VCC pin to MCU +3.3V directly, and also SCL/SDA pins between MCU and TLA2024 directly.

Since used MSP430 USB2 function, I set TLA2024 I2C address 0x48 as other I2C components, but cannot work.

Can somebody help me check where is the problem?

I appreciate your support in advance!

Best Regards!

QM


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>