Other Parts Discussed in Thread: EK-TM4C123GXL
I'm trying to interface the 7 swiches which will work as a menu, up, down ect. They are connected to the controller as follows
Help - (PF0)
Left - (PA5)
Down - (PA2)
Right - (PA3)
Enter - (PA4)
Up - (PA6)
Menu - (PA7)
Esc - (PF1)
When i pressed the menu switch i tried to observe the Raw interrupt status as well as Masked interrupt status register values. Here one thing i observed is if i pressed the Menu button for the several times i was getting different values Here i'm attaching screenshots below,
If we compare both the pics we can see the different values coming for the same interrupt. What should be the reason for this??
Also my next tasks are dependent upon which pin is pressed so any other suggestions to get know which pin is pressed at a particular time will be also helpful for me.
Any help will be really appreciated.
void GPIOA_Handler(void) { key_pin_chk = GPIOIntStatus(GPIOA_BASE, true); // // Get the interrrupt status. // ui32Status = GPIOIntStatus(GPIOA_BASE, true); // // Clear the asserted interrupts. // GPIOIntClear(GPIOA_BASE, ui32Status); g_bIntFlagA = true; } void GPIOF_Handler(void) { uint32_t ui32Status; key_pin_chk = GPIOIntStatus(GPIOF_BASE, true); // // Get the interrrupt status. // ui32Status = MAP_GPIOIntStatus(GPIO_PORTF_BASE, true); // // Clear the asserted interrupts. // MAP_GPIOIntClear(GPIO_PORTF_BASE, ui32Status); key_pin_chk = GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1 | GPIO_PIN_0); g_bIntFlagF = true; }