Electronic – the common pin configuration upon microcontroller reset

gpiomicrocontrollerreset

I have looked through two datasheets and user manuals now for two different microcontrollers (LPC2387 and STM32F4xx), and I haven't found (probably missed) anywhere where the initial state of the GPIO pins was described on powerup or after reset.

My question is not specific for these MCUs, but in general, is it most common for GPIO pins to be initialized as input-floating (high-z) upon reset? Is there a standard convention, or do different MCUs do different things, and one needs to read the datasheet/manual for each MCU one works with?

Best Answer

I really don't believe that information is missing the datasheets. I have never seen it NOT there, although I have never used the particular microcontrollers you mention.

In general, at least for the micros I have used, I/O lines wake up to be as benign to the external circuit as possible. This means going to high impedance to the extent possible. In addition, pins that can be analog inputs are usually configured that way on power up. That is because digital inputs often are not intended to be held at intermediate voltages for extended time. Some might consume more power in that case, or oscillate, or do other annoying and possibly out of spec things.

However, the definative answer is in the datasheet of whatever micro you are using.