The voltage to be sensed looks far exceed the inside ADC sense range.
For ADC single-ended input mode, the sense range is 0 - 2*VREF, if you select VREF as internal 1.2V System Bandgap.
All inputs should be in the range of VSSA to VDDA (generally 3.3V). Input voltage range is also limited by VREF. If voltage on negative input is Vn and the ADC reference is VREF, the range on the positive input is Vn ± VREF. This criterion applies for both single-ended and differential modes. In single-ended mode,Vn is connected to VSSA, VREF or an external input.
Better to apply a external divider on the 10V input to fit to the sense range.
Below code example for your reference -