This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401中断无法返回

MSP432P401中断无法返回,可以正常执行中断函数,但是不会再去执行主函数

定时器闪烁LED0 ,LED0连续闪烁。

但是中函数里LED1的翻转不会再进行。直接时钟定时器例程改的。

#include "main.h"
vu32 u1=1;

/* Application Defines */
#define TIMER_PERIOD 0x2DC6

/* Timer_A UpMode Configuration Parameter */
const Timer_A_UpModeConfig upConfig =
{
TIMER_A_CLOCKSOURCE_SMCLK, // SMCLK Clock Source
TIMER_A_CLOCKSOURCE_DIVIDER_64, // SMCLK/1 = 3MHz
65535, // 5000 tick period
TIMER_A_TAIE_INTERRUPT_DISABLE, // Disable Timer interrupt
TIMER_A_CCIE_CCR0_INTERRUPT_ENABLE , // Enable CCR0 interrupt
TIMER_A_DO_CLEAR // Clear value
};

int main(void)
{
//Usart1tInit();
led_init();
//SystemClockInit();
/* Stop WDT */
MAP_WDT_A_holdTimer();

/* Configuring P1.0 as output */
MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0);
MAP_GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);

/* Configuring Timer_A1 for Up Mode */
MAP_Timer_A_configureUpMode(TIMER_A1_BASE, &upConfig);

/* Enabling interrupts and starting the timer */
MAP_Interrupt_enableSleepOnIsrExit();
MAP_Interrupt_enableInterrupt(INT_TA1_0);
MAP_Timer_A_startCounter(TIMER_A1_BASE, TIMER_A_UP_MODE);

/* Enabling MASTER interrupts */
MAP_Interrupt_enableMaster();

/* Sleeping when not in use */
while (1)
{
u1++;
if(u1%20000==0)
GPIO_toggleOutputOnPin(GPIO_PORT_P2,GPIO_PIN0);
}
}

void TA1_0_IRQHandler(void)
{
MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
MAP_Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,TIMER_A_CAPTURECOMPARE_REGISTER_0);
}