There is a lot of good information in this link
Your question relates specifically to this part of the post -
- Variable Access
And the reason you should not put serial print in the time sensitive parts of the code -
- Fast Interrupt Service Routines
Let me know if that makes sense of not.
Duane B