Nucleo-F401RE use of PWM

I am fairly new to MBED and I have a number of the above boards
I am trying to get a PWM out put on A0/PA0
PwmOut Relay(A0); with relay.period(2.0f);
Doesnt seem to have the desired result do I need to set up a structure for PWM channel 2 and the port as I would have done in the past?

I would appreciate sum assistance with this thanks