I might be totally on the wrong track but why are you using PAX and PBx?
From memory (can't easily check at the moment) PAx and PBx are just numbers and don't refer to a port/pin combination. Try to serial print e.g. PA0 and PB0 and check the result.
Because I am using stm32f103.
PB0 is used by LCD, PB7 is output of the timer 4 channel 2.
Ihe program is working, changing the pins will not change of it performance.
If I change 1800 to 1700 on LCD I see different numbers, if I change 1800 to 1810 = no numbers are changing on LCD, even with 1850 no changes.
I am using stm32f103.
The output of pulseIn() is in microseconds. On the UNO the resolution is, I think, 4 microseconds.
What is the clock frequency of your processor? Even on a 16 MHz UNO you would have to change the PWM value by 16 to get a 1-microsecond change and 64 to get a 4-microsecond change. If your clock is running at 80 MHz it makes sense that a 50-tick change (0.625 microseconds) would not show up in a microsecond counter.
72MHz
And the numbers on LCD are jumping, for 1900 I have 47.48 and for 1800 - 84.24, I can't get 85.00 or 86.00, on scope I can notice pulse with is changing if I changde 1900 to 1910.
The DeltaTime variable you show is an unsigned long integer but the values you are showing now are floats. What did you change in your sketch?
If setOverflow() is still 7200 (100 microseconds) then setCompare() of 1800 should produce 25 microseconds HIGH and 75 microseconds LOW. setCompare() of 1900 should produce 26.38 microseconds HIGH and 73.61 microseconds LOW.