analogRead Arduino Due : strange behaviour

I have a simple program reading analog Values from the first three inputs. channel 0 = halve of Vcc (3,3V) channel 1 = GND channel 2 = potentiometer The first channel is ok, the second and third only sometimes. The reading "0" appears sometimes on channel 1 (OK) sometimes on channel 2! When I put a delay (100ms) between the readings I always get "511" (halve of Vcc) on all channels. On the Leonardo is everything OK!


void loop() { // read the value from the sensor: Serial.println("Messung "); sensorValue0 = analogRead(sensorPin0); delay(100); sensorValue1 = analogRead(sensorPin1); delay(100); sensorValue2 = analogRead(sensorPin2); digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); Serial.print(sensorValue0); Serial.print(", "); Serial.print(sensorValue1); Serial.print(", "); Serial.print(sensorValue2); Serial.print(", "); }


Please post your code.