Skip to main content
Hrishikesh
Associate III
March 12, 2021
Question

Can a pin that is configured as an external interrupt be also read?

  • March 12, 2021
  • 2 replies
  • 2707 views

Pretty much what the Q above says. Is it possible to do a HAL_GPIO_ReadPin on a pin that has been configured as an external interrupt?

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
March 12, 2021

Yes.

JW

Hrishikesh
Associate III
March 12, 2021

Thanks!

Tesla DeLorean
Guru
March 12, 2021

As far as I'm aware GPIOx->IDR is always an accurate representation of the current pin state whether in GPIO or AF modes. Analogue IN turns off the schmitt trigger on the digital input side, so perhaps not then.

Should be workable on all STM32 models/families

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..