Hi Kojto,
my problem is not setting voltage reference but how set the pin M3 for VREF_OUT configuration.
M3 pin has 4 possible configuration:
1)VREF_OUT
2)CMP1_IN5/
3)CMP0_IN5/
4)ADC1_SE18
It's not a PTx pin, then i can't use bit ALT to set its configuration.
Regards,
Teckna