2020-11-02 02:13 AM
Hi all,
is it possible to use the same GPIO-pin as Timer external trigger and falling edge external interrupt.
I'd like to create an application in which a rising edge on a GPIO starts a timer that sets an output for, say 2ms. After this time, another GPIO should be set for the duration of high level (that is: until a falling edge occurs) on the initial GPIO line.
Is this feasible?
I see no way to do this with the CubeIDE, but don't know what will happen if I set the registers "by hand"
Cheers,
Bob
Solved! Go to Solution.
2020-11-02 04:13 AM
> is it possible to use the same GPIO-pin as Timer external trigger and falling edge external interrupt.
Yes. EXTI is independent from other functionality, as long as the relevant pin is not set as Analog.
> I see no way to do this with the CubeIDE,
Cube generally does not cater for anything out of "usual.
> but don't know what will happen if I set the registers "by hand"
Set up GPIO for the required AF functionality (timer), and then set up EXTI and SYSCFG registers "by hand". This won't harm anything.
JW
PS. Btw., always state your STM32 model.
2020-11-02 04:13 AM
> is it possible to use the same GPIO-pin as Timer external trigger and falling edge external interrupt.
Yes. EXTI is independent from other functionality, as long as the relevant pin is not set as Analog.
> I see no way to do this with the CubeIDE,
Cube generally does not cater for anything out of "usual.
> but don't know what will happen if I set the registers "by hand"
Set up GPIO for the required AF functionality (timer), and then set up EXTI and SYSCFG registers "by hand". This won't harm anything.
JW
PS. Btw., always state your STM32 model.
2020-11-02 04:18 AM
Hi Jan,
thank you! The µC in question is STM32L412
I really am stunned by the versatility of these chips!
Bob