Could you please share the channel tab screenshot in the ADC configuration window ? What is the resolution you have chosen for channel 0 there ? Is it 10 bits in that window ?
I tried recreating the issue at my end with your set up and was not successful. I got the results like 0xFFFF as expected. Could you make sure that you are reading the results after the conversion is completed.
can be called before the result read after initiating a conversion.
One additional change I can suggest is the configuration you have chosen has an option of -noise signals in the results.
Instead of using this configuration, change the Vref to be VDDA/2 and Single ended negative input to Vref.
This should give you proper results.