signal name for pwm0 is pwm, so variables should change to pwm0_pwm and likewise