AnsweredAssumed Answered

STM8S003F3P6 - External Interrupt on PA3 does not work

Question asked by Paul Weh on Oct 16, 2017
Latest reply on Oct 16, 2017 by Paul Weh

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

Outcomes