Other Parts Discussed in Thread: TMP75
We are using a TMP75 temperature sensor as a slave to our MSP430F5338. I have configured with the code which was given as example to configure ACLK as input to the I2C line. We are facing issues when probing the SCL and SDA lines with different behaviour of single switch of the clock from high to low once or no response at all. Tried configuring with FLL and without FLL. The input clock given in XT1 is through a crystal oscillator operating at 32 Khz.
Configuring ACLK
void ConfigXT1(void)
{
P7SEL |= BIT0 + BIT1; //XT1IN, XT1OUT
UCSCTL4 |= SELA__XT1CLK;
UCSCTL6 &= ~(XT1OFF);
UCSCTL6 |= (XT1DRIVE0_L | XT1DRIVE1_L);
UCSCTL6 &= ~(XT1BYPASS|XTS);
do {
UCSCTL7 &= ~(XT1LFOFFG);
// Clear XT2,XT1,DCO fault flags
SFRIFG1 &= ~OFIFG; // Clear fault flags
} while( UCSCTL7 & XT1LFOFFG );
}
Configuring the I2C slave
P2SEL |= BIT1 + BIT2;
UCB0CTL1 |= UCSWRST; // Enable SW reset
UCB0CTL0 = 0x00;
UCB0CTL0 |= UCMST + UCMODE_3 + UCSYNC;
UCB0CTL1 |= UCSSEL_1;
//UCB0BR0 = 80;
//UCB0BR1 = 0; // Clear SW reset
UCB0CTL0 &= ~UCSLA10;
UCB0CTL1 &= ~UCSWRST;
UCB0I2CSA |= 0x4f;
UCB0IE |= (UCTXIE | UCRXIE) ; // Enable TX interrupt
__bis_SR_register(GIE);