2023-12-07 01:33 PM
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.
Solved! Go to Solution.
2023-12-11 06:11 PM
Putting a scope on the signal adds capacitance which will eliminate or mitigate the issue.
2023-12-07 01:46 PM
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.
2023-12-11 03:21 AM
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.
2023-12-11 06:11 PM
Putting a scope on the signal adds capacitance which will eliminate or mitigate the issue.