Help with interupt

Sounds like an XY Problem.
If your issue is "I fear my program gets stuck" ... fix the problem.
If you can't fix the problem, use the functionality of a Watchdog.