ADC / internal temperature sensor in PIC32MX350 can not be read
I'm using following code to read data from the ADC which itself should read the internal temperature sensor:
AD1CON1 = 0x8000;
AD1CON2 = 0x0;
AD1CON3 = 0x0;
AD1CHS = 0x1D0000;
AD1CSSL = 0x0;
Starting the ADC (done only once during initialisation - is this correct or needs it to be done repeatedly?):
AD1CON1bits.SAMP = 1;
To check if conversion is complete I read register AD1CON1bits.DONE - but it never returns a 1, so it looks like samping/conversion was never done.
Any idea what I'm doing wrong?