Other Parts Discussed in Thread: MSP430F6779
I am using IAR for development. I have changed the stack usage to 160. But, the terminal window remains blank.
#include <msp430f6779.h>
#include <io.h>
#include <stdio.h>
#include <stdint.h>
void initTimer_A(void);
unsigned int presenttime=0;
unsigned int lasttime=0;
unsigned int buffer=0;
unsigned char i=0;
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; //Stop watchdog timer
//BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz
//DCOCTL = CALDCO_1MHZ;
P2DIR &= ~BIT2;
P2SEL0 |= BIT2;
TA0CTL = TACLR;
TA0CTL = TASSEL_1 + ID_2 + MC_2;
TA0CCTL2 = CM_2 + CCIS_0 + SCS + CAP + CCIE;
_BIS_SR(LPM0_bits + GIE);
while(1);
}
//Timer ISR
#pragma vector = TIMER0_A1_VECTOR
__interrupt void Timer_A1_CCR2_ISR(void)
{
switch(TA0IV)
case 04:
{
presenttime = TA0CCR2;
buffer = lasttime - presenttime;
printf("period = %d", buffer);
TA0CCTL2 &= ~CCIFG;
lasttime = TA0CCR2;
}
}
Can you guide me to use the terminal window?