If you want a rough idea of the MCU temp, try this:
mbed::AnalogIn mcuADCTemp(ADC_TEMP);
.....
mcuTemp = __HAL_ADC_CALC_TEMPERATURE (3300, mcuADCTemp.read_u16(), ADC_RESOLUTION_16B);
will give a rough value in degrees C. You can tune the internal voltage (3300mv above) to your actual internal mV and there are other mbed macros for doing that