cancel
Showing results for 
Search instead for 
Did you mean: 

How to read values from a GPIO_EXTI pin?

RAnan.3
Associate III

I want to read values from ultrasonic sensor for my project. I use STM32l452RC controller. I am able to do that if I map that pin as GPIO_Input and by using the HAL command HAL_GPIO_Read_pin.

But I want to map the input of the ultrasonic sensors as interrupt pins. For that when I map them as EXTIx pins and enable the NVIC settings for that pin and use the same HAL command I am not getting any values from the sensor. Can anyone help me solve the issue ASAP.

1 REPLY 1

Selecting a pin as input for EXTI does not change in any way its behaviour in GPIO, so if there's any difference, it's in Cube/HAL.

Read out and compare content of relevant GPIO registers between the working and non-working cases.

JW