Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: DAC161S997EVM Debugging via FET430

$
0
0
Hi I am having an issue debugging my code via the FET430 UIF USB interface, I am trying to step through my code and it doesn't appear to be stepping it does on other microcontrollers. In particular, I seem to be having an issue with variables resetting to zero. Please see my code below void main( void ) { WDTCTL = (WDTPW | WDTHOLD); BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz DCOCTL = CALDCO_1MHZ; // Set DCO to 1MHz /* Configure timer A as a millisecond interval counter */ TA0CCTL0 = CCIE; /* Set out mode 0, enable CCR0 interrupt */ TA0CCR0 = 1000; /* Set maximum count value to determine count frequency */ TA0CTL = TASSEL_2 + MC_2; /* SMCLK as input clock, continuous */ __enable_interrupt(); /* Enable interrupts */ while( 1 ) { DoEveryMilliSecond(); DoEvery5ms(); } } #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A0_ISR (void) { ucEverymsFlag = TRUE; TA0CCR0 += 1000; /* Set maximum count value to determine count frequency */ } void DoEveryMilliSecond(void) { if(ucEverymsFlag==TRUE) { uc5msTimer++; /* Increments the 5ms counter */ if(uc5msTimer==5) /* If 5ms elapsed set 5ms flag */ { uc5msFlag = TRUE; uc5msTimer = 0; } } ucEverymsFlag = FALSE; } If I put a break point on the part of the code where it increments the 5mS counter it doesn't appear to be adding anything to it every time it breaks. I am using code that I wrote for another microcontroller ( MSP430FR5969 ) and it seemed to work fine on there. Is there a problem with my IAR settings or is it because on the microcontroller I am using?

Viewing all articles
Browse latest Browse all 62309

Trending Articles



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