AnsweredAssumed Answered

Pulldown dont work, LPC1769 only

Question asked by Bernd Sirozynski on Jul 4, 2019
Latest reply on Jul 10, 2019 by Bernd Sirozynski

Hello,
i do some tests with the GPIO Pulldown and have found, that in the Device LPC1769 only, not in LPC1768
the Pulldowns do not work on two pins. These Portpins are also used for I2C.1 but not used now.

 

Pulldowns on I2C.1 pins do not work, but LPC1769FBD100 only
PIN Number:58 Port:P0.20 also shared also with I2C SCL1
PIN Number:59 Port:P0.19 also shared also with I2C SDA1

 

Testobject:
LPCXpresso LPC1769 REV C (2010)  LPC1769FBD100
Pin P0.19 SDA1
Pin P0.20 SCL1

 

I have set the Pins to normal GPIO Input Mode and enabled the Pulldowns.
But the pins are always high. The Voltmeter shows 2,92 Volt with measured 3,13 Volt CPU Voltage.
Normaly a High measured on input configured pin are ca. 2,3 Volt because of internal "current sources"
These 2 Pins i can measure 2,92V
Normaly if i enable the internal pulldown, the voltage falls down to zero.
but only these two pins in LPC1769 works different. Enabling the Pulldown do nothing.

 

the same test with the I2C.2 peripheral and other port pins
the pulldowns works correct.

 

The same Software on LPC1768 and LPC1769 have differnt Portlevels at these 2 pins.

 

Maybe it is only a problem in the LPC1769 ? with Revision ???
My Testboard is an LPC1769 REV C (2010)
My CPU on the LPCXpresso Board is labled:
LPC1769FBD100
S2N525.1
ZSD1406A
 
Bernd

 

My Testcode:

  // first i test the GPIO P4.29 as input with pulldown enabled
  // this pin has also an alternate for USB_D+ bust not enabled now
  LPC_PINSEL9.bits.P4_29 = 0;      // 0=Portmode
  LPC_FIO4DIR.bits.P4_29 = 0;      // Direction 0=Input, 1=output
  LPC_PINMODE9.bits.P4_29 = 3;     // 3=Pulldown,  2=Pin has neither pull-up nor pull-down resistor enabled.
  LPC_PINMODE_OD4.bits.P4_29 = 0;  // 0=normal Mode, 1 = Open Drain
                                   // now, the pin P4.29 is low 0,000 Volt

  // the same procedure with P0.00 this is also the pin for SDA from I2C.1
  // setting to portmode with pulldown
  LPC_PINSEL0.bits.P0_0 = 0;      // 0=Portmode, Function  3 = I2C SDA1
  LPC_FIO0DIR.bits.P0_0 = 0;      // Direction 0=Input, 1=output
  LPC_PINMODE0.bits.P0_0 = 3;     // 3=Pulldown,  2=Pin has neither pull-up nor pull-down resistor enabled.
  LPC_PINMODE_OD0.bits.P0_0 = 0;  // 0=normal Mode, 1 = Open Drain
                                  // now, the pin is low 0,000 Volt

  // the same procedure with P0.10 this is also the pin for SDA2 from I2C.2
  // setting to portmode with pulldown
  LPC_PINSEL0.bits.P0_10 = 0;      // 0=Portmode, Function 2 = I2C SDA2
  LPC_FIO0DIR.bits.P0_10 = 0;      // Direction 0=Input, 1=output
  LPC_PINMODE0.bits.P0_10 = 3;     // 3=Pulldown,  2=Pin has neither pull-up nor pull-down resistor enabled.
  LPC_PINMODE_OD0.bits.P0_10 = 0;  // 0=normal Mode, 1 = Open Drain
                                   // now, the pin is low 0,000 Volt

// !!!!!! ---> PROBLEMS on pin P0.19 and P0.20  but onyl LPC1769 not in LPC1768 <-----
  LPC_PINSEL1.bits.P0_19 = 0;      // 0=Portmode, Function  3 = I2C SDA1
  LPC_FIO0DIR.bits.P0_19 = 0;      // Direction 0=Input, 1=output
  LPC_PINMODE1.bits.P0_19 = 3;     // 3=Pulldown,  2=Pin has neither pull-up nor pull-down resistor enabled.
  LPC_PINMODE_OD0.bits.P0_19 = 0;  // 0=normal Mode, 1 = Open Drain
                                   // !!!!! now, the pin P0.19 is HIGH 2,914 Volt

  LPC_PINSEL1.bits.P0_20 = 0;      // 0=Portmode, Function  3 = I2C SCL1
  LPC_FIO0DIR.bits.P0_20 = 0;      // Direction 0=Input, 1=output
  LPC_PINMODE1.bits.P0_20 = 3;     // 3=PullDown, Pin has neither pull-up nor pull-down resistor enabled.
  LPC_PINMODE_OD0.bits.P0_20 = 0;  // 1 = Open Drain, 0=normal
                                   // !!!!! now, the pin P0.20 is HIGH 2,914 Volt

  LPC_PCONP.bits.PCI2C1=0;       // disable I2C1 in the power config register
                                 // !!!!! Pin P0.19 and P0.20 are always HIGH

Outcomes