LPC804 pins default to output pull-up at reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC804 pins default to output pull-up at reset

1,201 Views
nora_zhao
Contributor I

A project using LPC804 found a problem, its PWM pin outputs a pulse waveform between power-on reset and execution of the PWM initial function.

Then I erase MCU flash and measure idle pins waveform, which are also output pull-up. This is different from the description in the user manual, all GPIO pins default to inputs at reset.

Could you please support this problem, thank you!

0 Kudos
Reply
5 Replies

1,196 Views
nora_zhao
Contributor I

The following show the pulse waveform after power-on reset. Red is MCU VDD and yellow is PWM output.

Snipaste_2022-11-23_14-58-15.png

0 Kudos
Reply

1,191 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the following pic I copied from the UM11065.pdf, during/after Reset, almost all pins are in GPIO input state with on-chip pull-up resistor enabled, that is why you see high logic for the PWM pins during/after Reset before you initialize the pin.

I suppose that you have to connect external 5K~10K ohm pull-down resistor for the PWM pins, this is common practice in order to keep the PWM pins low.

Hope it can help you

BR

XiangJun Rong

 

xiangjun_rong_0-1669194067571.png

 

0 Kudos
Reply

1,186 Views
nora_zhao
Contributor I

Hi XiangJun,

Thanks for your answer, but I'm still a little confused.  the following pictures I copied from the UM11065.pdf. If the port state is an input state at reset, the port internally internal circuit is connected to a Schmidt trigger, it will be a high resistance input state and should not have a pull-up level output. Why does the port direction have a lower priority than the output state?

Snipaste_2022-11-23_17-41-51.pngSnipaste_2022-11-23_18-01-50.png

0 Kudos
Reply

1,180 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As the following pic I copied from UM11065.pdf, when the weak pull-up is enabled, the pin will be in high logic. when the weak pull-down is enabled, the pin will be in low logic. Unfortunately, in default, the weak pull-up is enabled, the pin is in high logic as you have observed.

You have to connect an external pull-down resistor(5~10K ohm) to the pin so that the pin is in low logic.

Hope it can help you

BR

XiangJun Rong

 

xiangjun_rong_0-1669253629877.png

 

0 Kudos
Reply

1,153 Views
nora_zhao
Contributor I

Understand, thanks for your reply, and suggestion on the external circuit.

0 Kudos
Reply