IntPrioritySet lm3s

来源:互联网 发布:金蝶软件培训教程 编辑:程序博客网 时间:2024/06/07 06:39
 IntPrioritySet(INT_TIMER1A,     0x00);    // Set the priorities of the interrupts used by the application.
 IntPrioritySet(INT_GPIOB,       0x20);
 IntPrioritySet(INT_GPIOD,       0x20);
 IntPrioritySet(INT_TIMER0A,     0x20);
 IntPrioritySet(INT_WATCHDOG,    0x40);
 IntPrioritySet(INT_ADC0SS0,     0x60);
 IntPrioritySet(INT_PWM0,        0x80);
 IntPrioritySet(INT_PWM1,        0xa0);
 IntPrioritySet(INT_PWM2,        0xc0);
 IntPrioritySet(FAULT_SYSTICK,   0xc0);
 IntPrioritySet(INT_UART0, 0xe0);

 UART_Init(); 
 
 PWMInit();       // Initialize the PWM driver.
 ADCInit();       // Initialize the ADC.
 HallInit();       // Initialize the Hall Sensor control routines.
 UIInit();       // Initialize the user interface.
// ENET_Init();       // Initialize the Ethernet
 MainClearFaults();      // Clear any fault conditions that may have erroneously triggered as the ADC started acquiring readings

 UIRunLEDBlink(200, 25);      // Indicate that the motor drive is stopped.

 IntEnable(INT_WATCHDOG);     // Initialize the Watchdog timer for a 100ms timeout.
 WatchdogReloadSet(WATCHDOG0_BASE, WATCHDOG_RELOAD_VALUE);
 WatchdogResetEnable(WATCHDOG0_BASE);
 WatchdogEnable(WATCHDOG0_BASE);
 
 TimerConfigure(TIMER0_BASE, TIMER_CFG_32_BIT_OS);
 TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
 IntEnable(INT_TIMER0A);

原创粉丝点击