cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt on PE2 not working

anders2399
Associate
Posted on May 27, 2016 at 20:49

Hi,

I'm working on a STM321F407IG MCU and trying to get interrupt working on pin PE2.

I'm using HAL Library and got INterrupts Working on some of the other pins but not on PE2.

In GPIO Configuration I set Mode of the pin to GPIO_MODE_IT_RISING (tried the other ones as well) and enable

NVIC:

    HAL_NVIC_SetPriority(EXTI2_IRQn, 2, 3);

    HAL_NVIC_EnableIRQ(EXTI2_IRQn);

But the function

    void EXTI2_IRQHandler(void)

    {

      HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);

    }

gets called only called once when enabling the interrupt.

Afterwards any action on the pin is just ignored.

I can read the state of the pin and get valid results, but no interrupt.

The only guess I have is that interrupt handling is disabled for that pin due to some misconfiguration of debug/trace clock. (DBGMCU_CR register).

Can you confirm this or do you have any other idea what I could check?

Thanks in advance,

Anders

#pe2 #stm32f407 #interrupt
0 REPLIES 0