TIMSK1 equivilent on Due??

I wouldn't call detachInterrupt in an ISR, or at all come to that. Basically call attachInterrupt once
only in setup for a pin, and then leave it like that.

Make the ISR manage its own state with volatile variables, much more likely to work. You don't want
code to monkey with interrupt control registers in the middle of handling an ISR, thats full of
pitfalls for the unwary.