Just a guess. Not all pins support PWM. Maybe that's the reason. Are you free to configure which pin is used as S ?