It seems there is an error in the C code on page 177.
Actually it is:
while (musCounter < intCounter) {}
It should be:
while (musCounter >= intCounter) {}
Reasoning:
While (musCounter >= intCounter) the main flow actively waits.
It executes one step when the interrupt increments intCounter, that is when musCounter becomes < intCounter.
It seems there is an error in the C code on page 177.
Actually it is:
while (musCounter < intCounter) {}
It should be:
while (musCounter >= intCounter) {}
Reasoning: While (musCounter >= intCounter) the main flow actively waits. It executes one step when the interrupt increments intCounter, that is when musCounter becomes < intCounter.