AREF pin on arduino DUE

I want to use the AREF pin on Arduino Due to provide 1V to make it reference voltage for ADC. However, if I use analogReference(EXTERNAL); command in the IDE, the IDE gives the error "invalid conversion from 'int' to 'eAnalogReference {aka_eAnalogReference}'[-fpermissive]".

  1. Is there any other command for Arduino Due to change the reference voltage to AREF pin?

I moved your topic to an appropriate forum category @mussawarahmed.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Please have a look at https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReference/

It states: