Want Square Waves based on Injection Timing of 4-Stroke Engine
It takes me 20x as long to explain this as it would for me to design it.


  The optimal design should minimize latency with adequate noise resonance filtering , i.e. matched filter with maximum signal to noise ratio.



My timing analysis indicates your pulse has a resonance in the 3.75kHz region and the pulse interval is 32ms (31Hz) or 1875 RPM ( if 1/rev, 938 RPM if 2/rev).  
Tolerance to latency of 1 deg at 6000 RPM is equivalent to 28 us which needs to be accounted for in filter ignition timing vs RPM. A 28us = T for low pass filter, LPF (maximum. )


if 1 pulse/rev then 100Hz = 6000 RPM = 10ms interval

Alternative to a LPF filter is a non-retriggerable one shot with much like a scope trigger with a dwell of 6 cycles @3.75kHz unless there are conditions that exceed this. Thus 6/3.75kHz= 1.6ms
The signal is the negative edge from +22V for the leading edge of the Hall sensor while there is resonant noise on the trailing edge of the sensor after a period of reaching +22V.


There is some DC dwell to be ignored after the sensor's leading active low pulse and the trailing active high sense positive pulse. 

The ideal threshold appears to be in the 2 to 4V range for hysteresis thresholds. 


it is worthy to note that the positive feedback ratio defines the threshold and hysteresis as a function of the output swing with respect to the Reference level for a a differential amp. So ground is a poor choice of reference. It should be ~ V/2  or if 2,4V thresholds desired then V- =(2+4)/2 = 3V ( not ground )



Design Recommendation 


  Confirm signal, noise range and sensor if 1 or 2 pulse per rev and max RPM.



Stage 1: a 28us LPF  with Rseries 100k with shunt of C= 28us/100k = 280 pF  max. 
Stage 2: 5V 74HC14 Schmitt trigger using Vcc=5V with hystereis thresholds of Vcc/3, 2Vcc/3
Stage 3 rising edge 1 shot of 1.6ms with feedback to make non-retriggerable to disable input using. 74HC123








simulate this circuit &ndash; Schematic created using CircuitLab

100K current limits to 0.22mA satisfies the max 5mA internal ESD clamp diode specs. Latency of 28us needs to checked for max RPM.  One shot syncs to leading negative edge and filters out trailing edge glitch at all RPM. ( T=1.6ms needs to be increased to satisfy minimum RPM)