2024-10-15 11:49 PM
Hi All,
i am using STM32MP135-DK kit & i want to interface the ultrasonic sensor HC-SR04.
from user space i have tried to make gpio toggle at 10uSec ON/OFF which will be trigger signal for sensor but what i observe in the trigger output pin is not toggling at same rate what i made it in bash script.
can someone help me to resolve this or if we have ready solution available i can utilize it instead of reinventing it again.
2024-10-16 11:48 PM
Hi @prabhu1985
with a OS like Linux, it is quite impossible to control so short time using GPIOs framework.
I think you should use timers to accurately generate the pulse and measure the feedback pulse delay.
https://wiki.st.com/stm32mpu/wiki/TIM_internal_peripheral
Maybe some Linux drivers already exist for the HC-SR04 and could be tried/ported on STM32MP135.
Regards.
2024-10-17 11:59 AM
Hi @prabhu1985
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards,
Billy