User Activity

I have been trying to get values from an HCSR-04 sensor, but I only get garbage values. I debugged it and saw that my code doesn't clear the UIF flag of the TIM2 SR register. Could this be the cause of the garbage values? I tried the sensor with an A...