An millis() function inside ISR function is not working like usual, instead it jamms the whole program until manually reset the board.