cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt not getting Triggered on STM32MP1

Deepaks020
Associate

Hi,

I am working on a custom hardware based on STM32MP1 mpu and also uses some other peripherals too. For our use case, we are using Yocto Linux. I am using the pin PA12 as an input GPIO interrupt, configured to trigger for falling edge. The interrupt works fine and gets triggered whenever the pin level goes low.

I need to use an led also as part of the application which is connected on-board to PD12. I opened the /sys/class/gpio/export and write the pin no. to the file and then set the direction as out in direction file.

But when the GPIO pin is enabled, the interrupt is not triggering. When we disable the GPIO pin and test, the interrupt works fine. The same happens if I enable the same pin no. on any GPIO port, whether it is PB12 or PC12 or PF12. I checked the registers also but everything is fine.

Can anyone help me with this issue. I am really stuck with this problem.

 

REGISTERADDRESS VALUE
EXTI_FTSR1 0x5000D004 0x00001000
EXTI_RTSR1 0x5000D000 0x0
EXTI_EXTICR30x5000D068 0x0
EXTI_EXTICR40x5000D06C 0x0
2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @Deepaks020 ,

 

I don't know what may happens but AFAIK the way you try to enable the GPIO through export file is not a recommended method in OpenSTLinux

 

I think you might manage it from Device Tree. 

 

Please browse following wiki page : 

 

GPIOLib overview

Overview of GPIO pins

How to control a GPIO in userspace

GPIO device tree configuration

 

Hope it help 

 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you Olivier for the quick response. And, let me try to enable the GPIO, the way you suggested and test. I will update you soon.

Thanks