cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX How to add external interrupt to pin used by another peripheral ?

I have a simple question. How to "attach" external interrupt to pin "selected" as Alternate Function of some peripheral in CubeMX. For example:
I set PA8 as TIM4_ETR signal. Then i want to add external interrupt on the same pin. How to do that in CubeMX ? 
Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

AFAIK you cant, this is a design choice of Cube/CubeMX.

People circumvented this in past by a certain sequence of calls (in code - I don't use Cube so I don't know the details, you can try to search here), but it's probably simpler to write your own code using directly registers.

JW

View solution in original post

3 REPLIES 3

AFAIK you cant, this is a design choice of Cube/CubeMX.

People circumvented this in past by a certain sequence of calls (in code - I don't use Cube so I don't know the details, you can try to search here), but it's probably simpler to write your own code using directly registers.

JW

Sarra.S
ST Employee

Hello @Michal Dudka

As @waclawek.jan already said, you can't do that by CubeMX, you'll need to fix the EXTI and GPIO registers after init and create the ISR.  

Please check this post, it can be helpful!

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.

Piranha
Chief II

You chose this and now you are asking for electric windows...