Electronic – drive strength a measurement of

gpiomicrocontrolleroutput

In microcontrollers and the like that have programmable drive strengths for GPIOs, said drive strengths are defined in mA. For example you might have a choice of 2mA, 4mA, 6mA, 8mA, etc. My assumption, is that for each output drive strength, there is a corresponding output buffer, and that the software drive strength setting controls a mux that decides which buffer drives the pin. Is that correct?

Second question: I understand that, for example, doubling the drive strength effectively doubles the size of the output buffer (or, equivalently, halves the output impedance), but what is the drive strength actually a measure of? Say the drive strength is 4mA, what does that actually mean? My guess is that the pins Voh/Vol is not guaranteed if you draw a higher current, but I'd be curious to know how these values are characterized/chosen by the vendor.

I wanted to add this in response to CL. below, but I'm not sure how to add images in comments.

This is from the same datasheet he references:

test

Edit: jump back and forth a few times between this table, and the "typical" curves below and one gets a better feel for an interpretation of drive strength. The question however remains unanswered. Perhaps this is only something someone who writes data sheets could answer. I suppose the question could also be generalized to "how do IC companies determine their min/typ/max values?". As an example in the image above, the drive strength for "full setting" is given as 15mA, with 3V Vcc, if you want a max Vol of Vss + 0.60V. What is the process to arrive at this number? Set the pin low and force it to sink current until Vol hits 0.6V, then take the current being sunk and round down to the nearest mA? There's probably a statistical component as well to arriving at the number. I'd be surprised if they only characterize one die, probably many over all the different PVT corners.

Best Answer

The more current you source or sink through a pin, the more the voltage deviates from the ideal voltage.

Here is what the datasheet of some random microprocessor says about the relationship between output current and output voltage (you should find such specifications in any datasheet):

 output current vs. output voltage at different drive strengths

The question is not so much how much current the pin can handle (if you go near the absolute limit, your circuit is likely to fail anyway), but how much of a voltage drop you can tolerate.

Furthermore, a higher drive strength can supply the needed current faster when switching, which means that the voltage also switches faster, i.e., you have shorter raise/fall times. This implies that higher drive strength can result in increased EMI.