
Setup
}
// User NMI interrupt service routine
#pragma vector=UNMI_VECTOR
__interrupt void UNMI_ISR (void)
{
int n=0;
// Efficiently decode the User NMI interrupt source
switch (__even_in_range(SYSUNIV, SYSUNIV_SYSBUSIV)) {
case SYSUNIV_NMIIFG :
{
for(n=0; n<10; n++) {
volatile unsigned int i;
P1OUT ^= 0x01;
// Toggle RED led
i = 10000;
// SW Delay
do i--;
while(i != 0);
}
volatile unsigned int i;
P4OUT |= BIT7;
// GREEN LED ON
i = 10000;
// SW Delay
do i--;
while(i != 0);
P4OUT &= ~BIT7;
// Set P4.7 GREEN LED OFF
P2OUT |= BIT3;
// Done High
__delay_cycles(100);
// Set Delay;
P2OUT &= ~BIT3;
// Done Low;
}
break;
case SYSUNIV_OFIFG :
case SYSUNIV_ACCVIFG :
case SYSUNIV_BUSIFG :
default :
break;
}
}
10
TPL5010 Evaluation Module
SNAU173 – January 2015
Copyright © 2015, Texas Instruments Incorporated