Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21949

MSP430F6726 IPN : SD24B (ADC) interrupt is getting disabled on GIE and / or I2C start condition

$
0
0

HI,

I am using MSP430F6726IPN for ADC and I2C for communication with other on board peripherals. I have configured two channels for ADC.

//I2C initialization is done as follows  

UCB0CTLW0 |= UCSWRST; // Enable SW reset

UCB0CTLW0 |= UCMST | UCMODE_3 | UCSSEL__SMCLK; // I2C Master, use SMCLK

UCB0BRW_L = 80; // fSCL = SMCLK/80 = ~100kHz
UCB0BRW_H = 0;
UCB0CTLW0 &= ~UCSWRST; // Clear SW reset, resume operation
UCB0IE |= UCTXIE0;

Code for ADC initialization is as follows which is a part of device initialization 

// configure SD24B for product specific analog signal measurement 

SD24BCCTL0 |= SD24DF_1 + SD24SCS_0; // channel 0
SD24BOSR0 |= OSR__256;
SD24BIE |= SD24IE0;

SD24BCCTL0 |= SD24SC;

// configure SD24B channel 1 for AVCC measurement

SD24BCCTL1= SD24DF_1+SD24SCS_0; // no interrupt, Select input Channel 0 (AVcc/11)
SD24BOSR1 = OSR__256;
SD24BIE |= SD24IE1;

SD24BCCTL1 |= SD24SC;

Below code starts I2C communication and using TX interrupt based mechanism for sending data over i2C

 I2CWriteInit 

{

UCB0CTL1 |= UCTR; // UCTR=1 => Transmit Mode (R/W bit = 0)
UCB0IFG &= ~UCTXIFG0;
UCB0IE &= ~UCRXIE0; // disable Receive ready interrupt
UCB0IE |= UCTXIE0; // enable Transmit ready interrupt
__bis_SR_register(GIE); 

}

// I2C TX, start condition
UCB0CTL1 |= UCTXSTT;

When I execute above start condition then SD24B channel 0 interrupt is automatically disabled in SD24BIE register channel remains configured. I am not sure why this automatic disabling occurs on channel 0.  

The attached snapshot shows details of the scenario mentioned above. Please let me know why this behaviour is being is shown.

Regards,

Vivek


Viewing all articles
Browse latest Browse all 21949

Trending Articles



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