Other Parts Discussed in Thread: EK-TM4C123GXL
I have several interrupts on other ports that work fine, but I can't get the interrupt to work on port A. The following works:
// B0 In RmtRxd
// B1 Out RmtTxd
// B2 Out SCL LCD
// B3 I/O SDA LCD
// B4 In Mode Switch
// B5 In Lock Switch
// B6 In TP37 PU
// B7 In TP15 PU
// I2C0 & UART1//
GPIO_PORTB_AFSEL_R |= 0x0F; // Alt Funct: I2C0 and UART1.
GPIO_PORTB_PCTL_R &= ~(0x00001111); // Mux Pins to I2C0 and UART1.
GPIO_PORTB_PCTL_R |= 0x00001111; //
GPIO_PORTB_ODR_R |= 0x08; // Open Drain Pads.
GPIO_PORTB_DATA_R = 0x02; // Outputs High.
GPIO_PORTB_PUR_R = 0xC0; // Pullups.
GPIO_PORTB_DIR_R = 0x02; // Outputs.
GPIO_PORTB_DEN_R = 0xFF; // All On.
IntRegister(INT_GPIOB, PortB_Interrupt); // Register Interrupt Handler.
GPIO_PORTB_IBE_R = MODE_BUTTON_BIT | LOCK_BUTTON_BIT; // Interrupt on both edges.
GPIO_PORTB_IM_R = MODE_BUTTON_BIT | LOCK_BUTTON_BIT; // Enable Interrupts.
Note that MODE_BUTTON_BIT is 0x10 and LOCK_BUTTON_BIT is 0x20.
But the following does not work:
// A0 In RxD/
// A1 Out TxD/
// A2 In TP33 PU
// A3 In BattPwrSense v6.0
// A4 In TP35 PU
// A5 In TP36 PU
// A6 (Out) SCL2 USB
// A7 (I/O) SDA2 USB PU
GPIO_PORTA_AFSEL_R = 0x03; // Alt Funct: UART0.
GPIO_PORTA_PCTL_R = 0x00000011; //
GPIO_PORTA_PUR_R = 0xB4; // Pullups.
GPIO_PORTA_DEN_R = 0x0B; // All On.
IntRegister(INT_GPIOA, PortA_Interrupt);// Register Interrupt Handler.
GPIO_PORTA_IBE_R = PA_SW_SENSE_BIT; // Interrupt on both edges.
GPIO_PORTA_IM_R = PA_SW_SENSE_BIT; // Enable Interrupts.
Thanks, Doug
P.S., I'm using the Sourcery CodeBench IDE if it matters.