Hello!
I'm trying to read two interrupts from two different ports, but it doesn't work. If I disable initialization of one port, the other will work fine. And vice versa. I'm using TivaWare, and I can't figure out what's wrong.
One interrupt is for reading remote controller values, and other for reading "data ready pin" of MPU6050.
I'll paste code for both interrupts below.
Thanks for your help!
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); SysCtlDelay(3); GPIOPinTypeGPIOInput(GPIO_PORTD_BASE, GPIO_PIN_1); GPIOIntDisable(GPIO_PORTD_BASE, GPIO_PIN_1); GPIOIntClear(GPIO_PORTD_BASE, GPIO_PIN_1); GPIOIntRegister(GPIO_PORTD_BASE, readMPU); GPIOIntTypeSet(GPIO_PORTD_BASE, GPIO_PIN_1, GPIO_RISING_EDGE); IntPrioritySet(INT_GPIOD, 0); GPIOIntEnable(GPIO_PORTD_BASE, GPIO_INT_PIN_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlDelay(3); GPIOPinTypeGPIOInput(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7); GPIOIntDisable(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7); GPIOIntClear(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7); GPIOIntRegister(GPIO_PORTA_BASE, RXChannel); GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7, GPIO_BOTH_EDGES); IntPrioritySet(INT_GPIOA, 0); GPIOIntEnable(GPIO_PORTA_BASE, GPIO_INT_PIN_2 | GPIO_INT_PIN_3 | GPIO_INT_PIN_4 | GPIO_INT_PIN_5 | GPIO_INT_PIN_6 | GPIO_INT_PIN_7);