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.

如何在RTOS裡面註冊GPIO Interrupt?



Hi TI,

   1. 我以wlan_station example為主,想註冊GPIO Interrupt,但是我按下列寫法,雖然可以偵測到interrupt,但是跑一段時間後就會當機,想請問是為什麼?怎麼解決?

 // Set Interrupt Type for GPIO

 GPIOIntTypeSet(GPIOA0_BASE, GPIO_PIN_0, GPIO_BOTH_EDGES);

 GPIOIntRegister(GPIOA0_BASE,GPIOA0_Interrupt);

 // Enable Interrupt
 GPIOIntEnable(GPIOA0_BASE,GPIO_INT_PIN_0);

 2. 如果我改成下列寫法,在執行過程中有發生interrupt都抓不到,請問是哪邊寫錯?
 // Set Interrupt Type for GPIO
 GPIOIntTypeSet(GPIOA0_BASE, GPIO_PIN_0, GPIO_BOTH_EDGES);
 osi_InterruptRegister(INT_GPIOA0,(P_OSI_INTR_ENTRY)GPIOA0_Interrupt, INT_PRIORITY_LVL_1);
 // Enable Interrupt
 GPIOIntEnable(GPIOA0_BASE,GPIO_INT_PIN_0);