cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown interrupt on EXTI2 with GUI STemWin

TiagoAQ
Associate

Hello!

Im having some problems with STM32F429ZIT about the interrupt handler. My microcontroller is connected on a LCD display by LTCD bus pheripheral and also has a interrupt input pin (PG2 - EXTI2 on falling edge detection border) connected on a external driver. All the hardware connections are ok.

The problem is that my EXTI callback is being triggered even if i let PG2 always in low! At this moment my callback funcion has just only this code to test:

 

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)

{

if( GPIO_Pin == GPIO_PIN_2) HAL_GPIO_TogglePin(LED_GPIO_Port, LED_Pin);

}

 

Note: the LCD display is being controlled by a GUI library from STemWin. I have noted that when i disable the library (remove the init function from my main code), the interrupt handler of EXTI works as expected. But if i enable the LCD, the interrupt handler get triggered randomly.

Can someone give me some idea about wich trouble is and a solution?

Al the others GPIO Pins 2 are disabled (none of them are also used on LCD).

I cant use PG2 as input pin without interruption, in this appllication the poolling idea isnt suitable.

1 ACCEPTED SOLUTION

Accepted Solutions

Putting a scope on the signal adds capacitance which will eliminate or mitigate the issue.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

How is PG2 connected exactly? Probably is seeing interference from other signals causing the pin to drop. Consider adding a low pass RC circuit to eliminate noise from triggering it.

 

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for the response TDK, i have tried this attempt but wasn't succed. I have also measured with oscilloscope on PG2 and didn't find any noise or spike that can be able to trigger the EXTI.

Putting a scope on the signal adds capacitance which will eliminate or mitigate the issue.

If you feel a post has answered your question, please click "Accept as Solution".