Arduino Due - Internal pull-up resistors

Hi - I am new to using the Arduino Due and usually use the Atmel MCU.
I have an issue when setting the internal pull-up resistors on the due. Although I use the pinMode (pin, INPUT_PULLUP); command, when the state of the pin if polled it shows as LOW rather than HIGH.

Attached is my code which goes into void setup () and I'd appreciate any help.

Dan

Serial.begin(9600);           //Needs to be enabled for tuning
  
  Serial.println("Switch 2 toggles on/off the PID controller");
  Serial.println("Switch 3 toggles on/off the PID tuning");
  Serial.println();
  Serial.println("**Reminder** PID tuning values are not saved and must be changed manually in the code");
   
  pinMode(12, INPUT_PULLUP);    //Set up switch 2 as an input
  pinMode(11, INPUT_PULLUP);    //Set up switch 3 as an input
  
  Serial.println();
  Serial.print("Switch 2 state: ");
  Serial.println(digitalRead(12));
  Serial.print("Switch 3 state: ");
  Serial.println(digitalRead(11));
  Serial.println();
  Serial.print("Initial p_gain = ");
  Serial.println(Kp);
  Serial.print("Initial i_gain = ");
  Serial.println(Ki);
  Serial.print("Initial d_gain = ");
  Serial.println(Kd);
  Serial.println();

What is connected to pins 11 & 12 and how is it wired?

The pins are connected to switches - through to ground.

Simple test, what does it read when you disconnect the switches?

Your switches might be of the 'normally closed' type (or you have the pin connected to the NC contact of the switch).

Thank for the help - the switches were normally closed thus the reported state became inverted. Sometime you just cannot see the wood for the trees