2024-09-03 03:33 AM - edited 2024-09-03 03:33 AM
Hi!
What interruppt code line should I use when connecting to the PMIC?
The choices are:
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";
Solved! Go to Solution.
2024-09-03 04:53 PM
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.
2024-09-03 04:53 PM
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.
2024-09-04 01:27 PM
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: