TIM3-> CCR1 is not capturing TIM3->CNT value in input capture function .I am trying to interface HC-sr04 Ultrasonic sensor to STM32F401. I am giving input to TRIG pin with 10 micro second ON and Need to Measure Pulse from ECHO pin of the Sensor.
#include<NEW.h>void Ultra_setting();void delay();int timeStamp = 0;int main(){ //GPIO A configuration Ultra_setting(); Gpio_Init(); //input capture mode RCC->APB1ENR |= 2; //ENABLE TIMER 3 TIM3->PSC = 16; //divide by 16 TIM3->CCMR1 |= (0b01...