cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use multiple functions on a single pin on STM32U5?

Bastien LS
Associate III

According to the RM, I think that it is possible to use multiple analog functions on a single pin.

Can we do the same with digital pins? What I would need is to put a timer channel (as input) and an external interrupt input on the same pin.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

In general, you can only use one peripheral (alternate function) at a time on a pin. However, EXTI operates independently from the peripherals, so you can use this independently. HAL doesn't support this, but it can be set up in code manually.

So yes, you can enable an EXTI interrupt on a pin while still using it as a digital input/output/AF.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

In general, you can only use one peripheral (alternate function) at a time on a pin. However, EXTI operates independently from the peripherals, so you can use this independently. HAL doesn't support this, but it can be set up in code manually.

So yes, you can enable an EXTI interrupt on a pin while still using it as a digital input/output/AF.

If you feel a post has answered your question, please click "Accept as Solution".

That is a good feature

Thank you