Skip to main content
Visitor II
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

    Super User
    March 12, 2021

    Yes.

    JW

    Visitor II
    March 12, 2021

    Thanks!

    Graduate II
    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