cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify which pin can sink most current on any STM32 microcontroller

B.Montanari
ST Employee

Summary

This article guides readers through locating key information in STM32 documentation, using the STM32G081xB datasheet as a practical example. We illustrate how to identify details about the current sinking capabilities of pins, including the maximum current each pin can handle and the corresponding output voltage range.

Introduction

In microcontrollers, "sink current" refers to the ability of a pin to absorb current when it is connected to a lower potential (typically ground) in an electrical circuit. In this mode, the pin acts as a current path from the load back into the microcontroller. The sink current capability is crucial for controlling devices such as diodes or transistors, where the pin pulls current through the external load. Understanding the sink current specifications of different pins is essential when designing circuits. It determines how much current a pin can handle without damage. This is a key consideration in ensuring both the functionality and longevity of the microcontroller.

Let’s read the datasheet!

By referencing the STM32G081xB datasheet, we demonstrate how to extract the current sinking capabilities and voltage ranges associated with it. You can access the official MCU documentation directly from the STMicroelectronics website by clicking here: STM32G081xB DS12231

When researching sink current information in any STM32 datasheet, two key tables are responsible to provide the necessary details. First, readers should navigate to the chapter called Electrical characteristics and locate the Absolute maximum ratings subchapter. Within this section, you will find the Current characteristics table, which specifies the maximum sink current that each pin type can handle safely. This table also outlines critical limits that ensure the microcontroller operates within safe electrical parameters, including the max current summing all I/Os.

Figure 1 – Current Characteristics Table from G0B1xB DatasheetFigure 1 – Current Characteristics Table from G0B1xB Datasheet

The second table to consult for detailed information is found in the same chapter Electrical characteristics of the datasheet, within the Operating conditions subchapter. Specifically, we want to navigate to I/O port characteristics, where the Output voltage characteristics table is located.

 

Figure 2 – Output Voltage Characteristics Table from G0B1xB DatasheetFigure 2 – Output Voltage Characteristics Table from G0B1xB Datasheet

 

By reviewing this table, you can gain a clearer understanding of the performance of the FT_f pins. The 'FT' designation stands for Five volt tolerant, indicating that these pins can handle higher voltages without damage. The '_f' suffix means that these pins are equipped to support fast mode plus (Fm+), which not only allows for a bit rate of up to 1 Mbit/s when associated with I²C, but it also provides enhanced drive strength for I/O operations. This makes FT_f pins particularly well suited for handling higher sink currents while maintaining optimal voltage levels.

When considering sink current, we focus on the MCU's behavior when setting the output to a low level. This brings us to two main choices:

  • Using a standard GPIO pins, where you can achieve up to 15 mA of sink current with a more relaxed output voltage level, potentially reaching up to 1.3 V in worst-case scenarios
  • Opting for the FT_f pins, these pins offer enhanced performance, allowing up to 20 mA of sink current while maintaining the output voltage as low as 0.4 V, making them the best option for applications that require stronger current sinking capabilities with more reliable low-level voltage.

To locate the FT_f pins in the STM32G081xB datasheet, navigate to the chapter titled Pinouts, pin description and alternate functions. Within this chapter, find the table labeled Pin assignment and description. This table provides detailed information on each pin’s function, including the FT_f pins, which are specifically designed for higher current sinking capabilities and enhanced drive strength.

By consulting this table, you can identify the pins that offer the best performance for your current sinking needs and understand their role in the overall pin configuration. Be aware that other letters can be added to the label, such as FT_fa. All possible symbols are listed in another table called Terms and symbols.  Just for reference, these are the mentioned tables:

 

Figure 3 – Terms and symbols highlighting the _f feature.Figure 3 – Terms and symbols highlighting the _f feature.

 

 

Figure 4 – FT_f pins highlighted in the Pin assignment TableFigure 4 – FT_f pins highlighted in the Pin assignment Table

If your application demands sinking more current than a single pin can handle, you can parallel multiple GPIOs. However, keep in mind that there is an upper limit of 80 mA for the total current sunk by the MCU, as outlined in Figure 1. Exceeding this limit could result in damage to the microcontroller, so careful consideration of the total current load is essential.

Conclusion

In summary, understanding the current sinking capabilities of STM32 pins is crucial for designing reliable and efficient circuits. This chapter guided you through the process of extracting and interpreting this information from the STM32 datasheets, using the STM32G081xB as examples. We explored how to identify maximum sink current, review voltage characteristics, and select the optimal FT_f pins for high current sinking.

 

Related links

Comments
Andrew Neil
Evangelist III

@B.Montanari wrote:

In microcontrollers, "sink current" refers to the ability of a pin to absorb current when it is connected to a lower potential (typically ground) in an electrical circuit.


Not just in microcontrollers - this is a very general term throughout electronics.

A picture is worth a thousand words:

 

AndrewNeil_1-1726576261394.png

https://startingelectronics.org/articles/current-sourcing-sinking/

 

 

 

Version history
Last update:
‎2024-09-16 09:41 AM
Updated by: