Skip to main content
NPal.2
Associate III
July 20, 2021
Solved

GPIO Interrupts on STM32MP1

  • July 20, 2021
  • 2 replies
  • 1563 views

Hi,

I am trying to interface a rotary encoder to A7 on STM32MP1.

I was able to get the CubeMx COnfiguration done and got the device tree file generated.

Also looked into this document:

https://wiki.st.com/stm32mpu/wiki/Interrupt_overview#pinctrl_irqchip

However i could not understand simply how do i detect interrupt has happened and take decision over it?

How are interrupt handler for this needs to be written?

This topic has been closed for replies.
Best answer by PatrickF

Did you check the SDK environment (needed to run a script each time a new console is open), see https://wiki.st.com/stm32mpu/wiki/Install_the_SDK#Start_the_SDK_up ?

Regards.

2 replies

PatrickF
Technical Moderator
July 20, 2021
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
NPal.2
NPal.2Author
Associate III
July 20, 2021

Hi @PatrickF​ . Thanks for your reply.

I am trying this procedure. But in due course while trying to compile the dts file while following this procedure i get error:

npal@npal-noccarc:~/STMDTB/kernel/kernel-sources$ make stm32mp157c-rotaryencoder-mx.dtb LOADADDR=0xC2000040 O="$PWD/../build"
make[1]: Entering directory '/home/npal/STMDTB/kernel/build'
make[1]: *** No rule to make target 'stm32mp157c-rotaryencoder-mx.dtb'. Stop.
make[1]: Leaving directory '/home/npal/STMDTB/kernel/build'
make: *** [Makefile:185: __sub-make] Error 2

I tried adding this manually to Makefile too. But not luck. Any suggestions?

PatrickF
PatrickFBest answer
Technical Moderator
July 20, 2021

Did you check the SDK environment (needed to run a script each time a new console is open), see https://wiki.st.com/stm32mpu/wiki/Install_the_SDK#Start_the_SDK_up ?

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
NPal.2
NPal.2Author
Associate III
July 21, 2021

hI @PatrickF​ : Thanks for pointing that out. Looks like it exits cleanly but not dtbs is generated. Am i missing something here ? I cannot see any dtb files generated in arch/arm/dts folder. post using alternate command make dtbs as well.