2022-06-15 04:58 AM
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.
2022-06-15 05:55 AM
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