Skip to main content
Visitor II
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

    NPal.2Author
    Visitor II
    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?

    PatrickFAnswer
    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.

    NPal.2Author
    Visitor II
    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.