I working on sam3x8e processor with atmel studio 6.2.
I have configured two gpios for interrupt on falling edge as follows:
pio_handler_set(PIOB, ID_PIOB, PIO_PB3, (PIO_IT_FALL_EDGE ), keyPressHandler); NVIC_EnableIRQ((IRQn_Type) ID_PIOB); pio_enable_interrupt(PIOB, PIO_PB3); pio_handler_set(PIOB, ID_PIOB, PIO_PA4, (PIO_IT_FALL_EDGE ), keyPressHandler); NVIC_EnableIRQ((IRQn_Type) ID_PIOB); pio_enable_interrupt(PIOB, PIO_PA4);
one gpio belongs to PIOA i.e PA4 and the other belongs to PIOB i.e PB3.
If I press key connected to PB3 pin I get single keypress event.
If I press key connected to PA4 pin I get multiple keypress events.
I have used all the TC channels. In attached datasheet there is some multiplexing
dependency for PA4 and TCLK1.
Can anyone tell me what initialization is to be done for PA4 and TC section so that PA4 work as expected. I have also used timers as below:
Timer0_100msTickTimer.tc = TC0; Timer0_100msTickTimer.channel = 0; Timer0_100msTickTimer.irq = TC0_IRQn; Timer1_KeyboardTimer.tc = TC0; Timer1_KeyboardTimer.channel = 1; Timer1_KeyboardTimer.irq = TC1_IRQn; Timer2_DisplayTimer.tc = TC0; Timer2_DisplayTimer.channel = 2; Timer2_DisplayTimer.irq = TC2_IRQn;
Please tell me if you can figure out for any wrong configuration.
Thanks and Regards, Mj