2017-10-16 05:03 AM
Hello,
iam trying to get a external interrupt an pin A3, but that does not work.
On other pins it work, but on this pin it does not work.
I will show you my code:
Configuration:
asm('SIM');
PA_ODR = 0; // All pins are turned off.
PA_DDR_DDR3 = 0; // PA3 is input.
PA_CR1_C13 = 1; // PA3 is pull high
EXTI_CR1_PAIS = 2; // Interrupt on falling edge.
EXTI_CR2_TLIS = 0; // Falling edge only.
asm('RIM'); �?�?�?�?�?�?�?
and Interrupt routine:
//
// Process the interrupt generated by the pressing of the button on PA3.
//
#pragma vector = EXTI0_vector
__interrupt void EXTI_PORTA_IRQHandler(void)
{
PC_ODR_ODR3 = !PC_ODR_ODR3;
}
�?�?�?�?�?�?�?�?
My debug point in the interrupt is never reached. And i absolutely dont know why.
Do you have a hint for me?Thanks, Paul
#pa3 #interrupt #external-interrupt2017-10-16 10:07 AM
I´m an idiot. I forgot to add:
PA_CR2_C23 = 1;
�?
Now it works :)
Thanks