Electronic – NXP LPC GPIO Glitches on every power up. How to solve

gpiomicrocontroller

I've been using NXP LPC microcontrollers for some time. One problem that I've faced in several projects is that every time the MCU is powered and a GPIO is setup to LOW logic level and output, a glitch in the GPIO pin happens.

The trace below was captured in one of the GPIOs of a LPC1548 and shows that the glitch has 1.84V and lasts for 1.26ms.
Glitch capture

Even considering that this glitch has low amplitude and is fast, anything connected to the GPIO can have undesired behavior on board power up.

Some time ago didn't know about this behavior I connected the GPIO to a MOSFET gate that was controlling a TRIAC (for AC motor control). Because of this glitch problem, everytime the system was turned on, the motor quickly bumped/shaked. In this particular problem I had to change the MOSFET from N channel to P channel and invert the GPIO logic so it won't glitch anymore. Problem fixed.

Anyway, I'm having this problem again in a project that I cannot keep changing or adding components to the board (for space and costs constraints).

Does anyone knows how can I eliminate this glitch?

Best Answer

Start up state of a gpio is usually defined as input, potentially with a weak pull. In general, you should always design circuits so that they will not malfunction if the controlling pin is hi-z. This might be an external pull down resistor, or it might be controlling the enable input of whatever the pin connects to. It looks like your pin is rising with the circuit voltage. It is good practise to hold all ics in reset until the power is stable. There are chips designed specifically for this - see mcp130 for example.

If you post a schematic we can be more helpful