Updates ISR code to be much faster as not to miss external clocks.