DUE CORE incorrect measuremet at analog Inputs

I have trouble with analog Inputs - I can´t measure rihgt value on any analog input.
I use the same sketch as for other Arduino boards like DUE, NANO, etc., but only with DUE CORE it doesn’t work.

Test code:
void setup() {
Serial.begin(9600);
analogReadResolution(12);
}
void loop() {
Serial.print (analogRead(A1));
}
Measured values:
• Input level 0V – approximately 2600 bit
• Input level ca. 0.3V-3.3V – the same value 4095 bit
• Input non connection – approximately 1300 bit

Powered by USB port or VBUS 5V – the same result…

What does that mean?

What is a DUE CORE?

Due Core - Arduino Compatible SAM3X8E 32bit ARM Cortex M3 Module

Thats NOT an arduino, I suggest going to the manufacturer for support.

  • Do you have the board definition loaded into the Arduino IDE?

  • Is there a board definition for this board on the Arduino IDE?

  • Does your code compile and can you load it?

  • When you say doesn't work what do you mean? Can you describe the results?

  • Can you run the blink without delay example on your board?

Answer to all guestions si yes.
All other functionality is OK, like blink, PWM, I2C, only function of analog Inputs is wrong.

When you say doesn't work what do you mean? If I connect voltage (0-3.3V) to analog input, output value not respond to input. For input level ca. 0.3 - 3.3V is output invariable (4095 bit).

Maybe you use the wrong pin? You can do a digitalRead(A1) with pin shorted to GND or to 3.3V.

What about all other analog inputs? Are they OK?

Trouble is with all analog inputs. It seems to be anything with ground, there are two ground pins, one of them is Agnd. Both ground pins are connected and results are the same.
Command digitalRead(A1) with pin shorted to GND or to 3.3V returns "0"

In that case I do not know. Soundslike something wrong with your board.

Assuming it never worked, and hoping your board has not been damaged I would suggest you look at the processor ADC chapter and see if you can set the registers and read the registers without using the Arduino Macro "analogread"

I'm not positive it was this board but I read one of the newer Arduino's had an issue with a capacitor in the ADC input/circuit. At the time I didn't think it could cause your issue but you might google some more.

I agree with you but I bought for my project 3 pcs - all three with the same problem.
I do not know...
Nevertheless thanks!