do some clean job.
added  judge statements to prevent EMI caused multiple irq in one second.