PWM Code to for mosfet gate

yes, i am trying to make the freq output for the pwm signal 30khz idk what's wrong