cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt on PMIC - GPIOA 0 or EXTI 55 in the Device Tree?

DMårt
Lead

Hi!

 

What interruppt code line should I use when connecting to the PMIC?

The choices are:

  • gpioa 0
  • exti 55

Which one should it be? Here is a snippet from my Linux DT.

 

	pmic:stpmic@33{
		compatible = "st,stpmic1";
		reg = <0x33>;
		interrupts-extended = <&gpioa 0 IRQ_TYPE_EDGE_FALLING>;
		/*interrupts-extended = <&exti 55 IRQ_TYPE_EDGE_FALLING>;*/
		interrupt-controller;
		#interrupt-cells = <2>;
		status = "okay";

 

 

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer
1 ACCEPTED SOLUTION

Accepted Solutions
iheb
Associate III

hello ,

I have encountered this a couple days ago through a discussion with a college

so in some examples i think there GPIO 0 is being used, and others is exti 55 , in previous versions of yocto like kirkstone you can find examples with exti_pwr.
in a nutshell the exti comes from the device tree bindings for the interrupt controller 'st,stm32-exti'
if you visit this wiki page (https://wiki.st.com/stm32mpu/wiki/Interrupt_overview#EXTI_irqchip) you see examples how to use the exti interrupt.
The EXTI peripheral is used to get an interrupt when a GPIO is toggling. It can also wake up the system from Stop low power mode, please refer to the wiki page here (https://wiki.st.com/stm32mpu/wiki/Interrupt_overview )

in general the EXTI irqchip allows the system to respond immediately to changes on the GPIO pin (e.g., a button press) by triggering an interrupt. This ensures that the event is processed as soon as it happens, rather than waiting for the next polling cycle. also it can offer Interrupt management API functions that can be used be used later on code as service routines for your particular application or the linux kernel,

finally you can check https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt to know more about the kernel interrupt controller.

View solution in original post

2 REPLIES 2
iheb
Associate III

hello ,

I have encountered this a couple days ago through a discussion with a college

so in some examples i think there GPIO 0 is being used, and others is exti 55 , in previous versions of yocto like kirkstone you can find examples with exti_pwr.
in a nutshell the exti comes from the device tree bindings for the interrupt controller 'st,stm32-exti'
if you visit this wiki page (https://wiki.st.com/stm32mpu/wiki/Interrupt_overview#EXTI_irqchip) you see examples how to use the exti interrupt.
The EXTI peripheral is used to get an interrupt when a GPIO is toggling. It can also wake up the system from Stop low power mode, please refer to the wiki page here (https://wiki.st.com/stm32mpu/wiki/Interrupt_overview )

in general the EXTI irqchip allows the system to respond immediately to changes on the GPIO pin (e.g., a button press) by triggering an interrupt. This ensures that the event is processed as soon as it happens, rather than waiting for the next polling cycle. also it can offer Interrupt management API functions that can be used be used later on code as service routines for your particular application or the linux kernel,

finally you can check https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt to know more about the kernel interrupt controller.

@iheb 

Thank you. I think I will use the same as the ".dtsi" files from dts folders. They must be some kind of right...i guess. "You never know with ST", it's STMicoelectronics new slogan for the company! :grinning_face_with_sweat:

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer