Trying to use a buzzer, tone and noTone freeze my program

When you call analogWrite(), you get one, fixed duty cycle, yet that is called PWM.