i have code in HAL_TIM_IC_CaptureCallbackvoid HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) {
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) {
/* Get the Input Capture value */
iC2Value1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1);
...
Hi I'm new to stm32Cube and have been trying for days to read these ultra sonic sensors. Here is the data sheet to the one i am using: https://www.maxbotix.com/documents/LV-MaxSonar-EZ_Datasheet.pdf if someone could please attach a picture of the stm...
Thank you vangelis i solved it thanks to that i changed my code it to have a 2 channels (1 direct on indirect) one for rising one for falling capture. The key to getting a nice looking output was as you said changing the prescaler to 72.