cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO Interrupts on STM32MP1

NPal.2
Senior

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
PatrickF
ST Employee

Hi,

did you have a look to https://wiki.st.com/stm32mpu/wiki/IIO_overview#How_to_use_the_framework

and https://wiki.st.com/stm32mpu/wiki/How_to_use_the_IIO_user_space_interface#How_to_use_the_quadrature_encoder_with_the_sysfs_interface

Regards.

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.
NPal.2
Senior

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?

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 'Accept as Solution' on the reply which solved your issue or answered your question.

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.