SLAA475A October 2010 – March 2019 MSP430L092
The A-Pool has three trigger sources. The triggers can be used to provide specific analog voltages on a dedicated time and can be also used to stop any A-Pool activity.
For stopping the A-Pool, it is possible to use the Timer_A0 capture/compare register 1 (CCR1). To do so, the stop signal must be generated by the application, and the TBSTP bit must be set to one.
Two timer capture compare registers (Timer_A0 CCR0 and Timer_A1 CCR0) can be used to start the A-Pool. To do so, the TA0EN and TA1EN bits must be set accordingly.
The following code shows how to start and stop the A-Pool with Timer_A0. The starting and stopping ADC ramps can be observed on the AOUT pin. The ADC ramp does not stop at a specific voltage level, because no SBSTP or CBSTP bits are set.
#include "msp430l092.h"
void main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
TA0CCR0 = 600; // Set start value to 600
TA0CCR1 = 300; // Set stop value to 300
TA0CCTL0 = OUTMOD_3; // Set CCR0 outmode to Set/Reset
TA0CCTL1 = OUTMOD_3; // Set CCR0 outmode to Set/Reset
TA0CTL = TASSEL_2+MC_1+TACLR; // Set SMCLK to timer clock source +
// Set timer to up mode +
// Clear timer count register
APCNF = CMPON+DBON+CONVON+APREFON+TA0EN;
// Enable comparator on +
// Enable DAC buffer +
// Enable conversion +
// Enable reference +
// Enable TimerA0 start
APCTL = APPSEL0+APPSEL2+OSEL+ODEN+TBSTP;
// Set DAC buffer output to PSEL +
// Select output buffer +
// Enable output driver +
// Enable timer based stop
while (1);
}