Pulldown dont work, LPC1769 only

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulldown dont work, LPC1769 only

Jump to solution
315 Views
Contributor III

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

0 Kudos
1 Solution
6 Views
NXP TechSupport
NXP TechSupport

Hello Bernd Sirozynski,

I know you config the pins to GPIO function, while on the demo board, the two pins have already connected

to other chip. please cut the P0.19 and P0.20 to have a try:

pastedImage_1.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
6 Views
Contributor III

Hello Alice_Yang,
first thank you for your answer.

the problem is not the I2C Bus but only these pins in GPIO mode:

Today i have test this on a new LPCXpresso1769 Board Revision D 2015  OM13085
The controller is labled:
LPC1769FBD100
SAS558.1  01
ZSD1524A

the same problem: the internal pulldowns in GPIO mode dont work on P0.19 and P0.20

My tests:
After power on the Board, all inputs are configured as input as default and the cpu clocks with the internal RC at 4MHz

The first main code has only a loop:
int main(void)
{
  while (1) ;  // loop forever
}

to simplyfy the test i uses 3 Pins of the Board, because they are direkt side by side on the LPCXpresso board:
these pins are:
P0.20  // at this pin there is a problem
P0.19  // at this pin there is a problem
P4.29  // no problem, only to compare the behavier

LPC_01.jpg

if you measure the voltage level you see, that
P0.19 = near VCC 3,3V
P0.20 = near VCC 3,3V
P4.29 = ca. 2,3V  (internal pullup is a current source)

now i enable the pulldowns of the P4.29 and for P0.19 and P0.20:

LPC_02.jpg

and see the following voltages:
P0.19 = 3,0V      // that is not correct
P0.20 = 3,0V      // that is not correct
P4.29 = 0,1 Volt  // okay

next test, i have connected external pulldowns and found that you need a lot of current to pulldown these two pins.

to minimize an error of any header file or so, i give you the complete code here
you can copy and paste it in your main loop. you dont need any other files


#define PINMODE1 *(volatile unsigned int*) 0x4002C044  // Pinmode for the P0.19 and P0.20
#define PINMODE9 *(volatile unsigned int*) 0x4002C064  // Pinmode for the P4.29 pin BIT 26 and 27


int main(void)
{
  PINMODE9 = (3 << 26);     // enable pull down for P4.29
  PINMODE1 =   (3 << 6)   // enable pull down for P0.19
             | (3 << 8);  // enable pull down for P0.20

  while (1) ;             // loop forever

}

Bernd

next i set the portmode to "Pin has neither pull-up nor pull-down resistor enabled" value 0x02

the pins goes high and have problems to pull it low with external resistor.

with external 10 K pulldown the level is 2,465V
with external 1K pulldown the level is 0,760V

Info: All measures are done with a high impedance >10 GOhm Multimeter DM3068 Rigol

0 Kudos
7 Views
NXP TechSupport
NXP TechSupport

Hello Bernd Sirozynski,

I know you config the pins to GPIO function, while on the demo board, the two pins have already connected

to other chip. please cut the P0.19 and P0.20 to have a try:

pastedImage_1.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Views
Contributor III

Hello Alice_Yang,
you're absolutely right, I didn't see that.

Thank you very much for your information,
I spent hours looking for the problem,

I've been working with these parts for years and I didn't even notice.

I am getting old (I am old) :-)

Bernd

0 Kudos
6 Views
NXP TechSupport
NXP TechSupport

Hello Bernd Sirozynski,

Please check whether the two pins connected to other parts on your board, for example I2C-EEPROM.

Or you can send the schematic to me, I help you to review. For this is a old version(2010), I only have the new one(2016).


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos