Pulse shaping principle of high-speed comparator
If you use operational amplifiers such as LM358 and LM324 for shaping. This phenomenon is not surprising. The output swing of such devices can not meet the requirements of TTL level of single chip microcomputer. In addition to the phenomenon you mentioned, it will also lead to the interruption of the single chip microcomputer can not be effectively triggered. However, if LM393 or CMOS operational amplifier is used for shaping, this phenomenon will not occur.