cancel
Showing results for 
Search instead for 
Did you mean: 

EXTI not work correct

np1
Associate II
Posted on August 04, 2011 at 08:53

When I use PA6,PD6 is EXTI_Trigger_Rising_Falling.When PA6 go H-->L, it generate interrupt, but When I keep PA6 still Low, and PD6 go H-->L, it not generate interrupt.

Please help me.

void main()

{

    CLK_SYSCLKDivConfig(CLK_SYSCLKDiv_1); 

    GPIO_Init(GPIOD ,GPIO_Pin_6, GPIO_Mode_In_FL_IT);

    GPIO_Init(GPIOA ,GPIO_Pin_6, GPIO_Mode_In_FL_IT);

    EXTI_SetPinSensitivity(EXTI_Pin_6, EXTI_Trigger_Rising_Falling);

    enableInterrupts();

    while (1)

    {

    };

}

/**

  * @brief External IT PIN6 Interrupt routine.

  * @param  None

  * @retval None

  */

INTERRUPT_HANDLER(EXTI6_IRQHandler,14)

{

    /* In order to detect unexpected events during development,

       it is recommended to set a breakpoint on the following instruction.

    */

    if(GPIO_ReadInputDataBit(GPIOA ,GPIO_Pin_6)== RESET)

        Conut1_count++;

       

    else if(GPIO_ReadInputDataBit(GPIOD ,GPIO_Pin_6)== RESET)

        Conut2_count++;

     EXTI_ClearITPendingBit(EXTI_IT_Pin6);

 

}

Tks all

4 REPLIES 4
Nickname13136_O
Associate II
Posted on August 04, 2011 at 13:39

Could you try with PD6 go L-->H, while PA6 is Low.

np1
Associate II
Posted on August 04, 2011 at 16:08

Still can not. If any PD6 or PA6 Low, can not generate interrupt by other Pin, I checked all Pin Px6 the same problem.

Please help me!

Nickname13136_O
Associate II
Posted on August 05, 2011 at 12:53

If you have PA6 high, can you can interrupt @ PD6 H-->L.

Thanks!

np1
Associate II
Posted on August 05, 2011 at 13:18

Yes, I am sure, I use Stm8L152C6.

If all pin H is no problem, but when 1 Pin Low, not interrupt at other Pin H->L or L ->H

Seems when 1 Pin Low, it will latch interrupt generator.I tested with all port the same , look like this MCUs not support.

Best regards