Part Number:CC3200
Tool/software: Code Composer Studio
Hello,
I am new to CC3200 device . I am trying hardware interrupt with CC3200. I am modifying blinky example of CC3200 SDK .
Below is my ISR
void pushbuttonhandler(void)
{
LEDBlinkyRoutine();
// write your code here.
GPIOIntDisable(GPIOA2_BASE,GPIO_PIN_6);
GPIOIntClear(GPIOA2_BASE,GPIO_PIN_6);
IntDisable(INT_GPIOA2);
}
int
main()
{
BoardInit();
MAP_PRCMPeripheralClkEnable(PRCM_GPIOA1, PRCM_RUN_MODE_CLK);
MAP_PRCMPeripheralClkEnable(PRCM_GPIOA2, PRCM_RUN_MODE_CLK);
// 3 SYSY CLOCK AFTER GPIO CLK ENABLED //
MAP_UtilsDelay(10);
PinTypeGPIO(PIN_64, PIN_MODE_0, false); //
GPIODirModeSet(GPIOA1_BASE, 0x2, GPIO_DIR_MODE_OUT);//GPIO 10
PinTypeGPIO(GPIO_PIN_6, PIN_MODE_0, false);
GPIODirModeSet(GPIOA2_BASE, GPIO_PIN_6, GPIO_DIR_MODE_IN);
GPIOIntTypeSet(GPIOA2_BASE, GPIO_PIN_6, GPIO_FALLING_EDGE); // GPIO 22 sw pin
IntRegister(INT_GPIOA2, &pushbuttonhandler);
IntPrioritySet(INT_GPIOA2, INT_PRIORITY_LVL_1);
GPIOIntClear(GPIOA2_BASE, GPIO_PIN_6);
IntPendClear(INT_GPIOA2);
IntEnable(INT_GPIOA2);
GPIOIntEnable(GPIOA2_BASE, GPIO_PIN_6);
//
// Initialize Board configurations
//
//
// Power on the corresponding GPIO port B for 9,10,11.
// Set up the GPIO lines to mode 0 (GPIO)
//
PinMuxConfig();
GPIO_IF_LedConfigure(LED1|LED2|LED3);
GPIO_IF_LedOff(MCU_ALL_LED_IND);
//
// Start the LEDBlinkyRoutine
//
//LEDBlinkyRoutine();
while(1)
asm(" NOP");
return 0;
}
void LEDBlinkyRoutine()
{
//
// Toggle the lines initially to turn off the LEDs.
// The values driven are as required by the LEDs on the LP.
//
// GPIO_IF_LedOff(MCU_ALL_LED_IND);
while(1)
{
//
// Alternately toggle hi-low each of the GPIOs
// to switch the corresponding LED on/off.
//
MAP_UtilsDelay(8000000);
GPIO_IF_LedOn(MCU_RED_LED_GPIO);
MAP_UtilsDelay(8000000);
GPIO_IF_LedOff(MCU_RED_LED_GPIO);
MAP_UtilsDelay(8000000);
GPIO_IF_LedOn(MCU_ORANGE_LED_GPIO);
MAP_UtilsDelay(8000000);
GPIO_IF_LedOff(MCU_ORANGE_LED_GPIO);
MAP_UtilsDelay(8000000);
GPIO_IF_LedOn(MCU_GREEN_LED_GPIO);
MAP_UtilsDelay(8000000);
GPIO_IF_LedOff(MCU_GREEN_LED_GPIO);
}
}
in above code : GPIO22 is hardware interrupt
GPIO9 , GPIO10, GPIO11 , is ledblink routine
I am observing that without interrupt at GPIO22 Pgramme counter is going to ISR . Why it is happing?