Good to hear that.
In that case, you will need to configure the Pin and PWM output and change the duty cycle. But I am assuming PWM is being used for motor speed control, so you do not have any more PWM port.
Anyway, to get analog output, you can apply simple RC low pass filter. A resistor and capacitor will do.