Article count:561 Read by:1105636

Account Entry

Practical experience | Download and generate STM32 component package library from CubeMX

Latest update time:2024-10-23
    Reads:


0 1
introduction

When using STM32 for project development, the corresponding component package library needs to be used in both schematic and PCB design. The accuracy of the STM32 component package library is the prerequisite for ensuring the success of the design.
The latest version of STM32CubeMX has a built-in download tool for STM32 component packages. The downloaded package library files can be called in schematic and PCB designs after conversion by EDA tools.

This article will give a simple example of how to download and convert.



0 1
Download STM32 package files in STM32CubeMX

Below we take STM32H503CBT as an example to briefly introduce how to download the package library file of STM32 MCU in STM32CubeMX.
After opening STM32CubeMX (Version 6.9.0 is used in this example), select the STM32 model used and enter the configuration page.
Assign corresponding functions to the STM32 pins according to the circuit requirements. (If you do not need to display the pin assignment functions in the schematic STM32 package library, this step can be ignored.)
At this point, we will see the component diagram as shown below:

Figure 1. STM32H503CVTx in CubeMX
Click the Tools menu bar in the upper right corner of the above picture. After entering the Tools interface, click the CAD menu on the left to enter the CAD component package library configuration and download page.

Figure 2. CAD component library interface

Then select the CAD file format in the option box below according to the EDA tool used in the hardware design:

Figure 3. CAD format selection
The available STM32 component library packaging formats support mainstream EDA design tools, including PADS, Altium Designer, Cadence, etc. Here we take Altium Designer (AD) and Pads as examples. You can see that the tool formats to be downloaded are listed in the download box, and multiple formats can be downloaded at one time:

Figure 4. Select different formats to download tools

The STM32 CAD file downloaded from CubeMX is generated in the cloud based on the Ultra Librarian tool. Here we need to check the terms and conditions of Ultra Librarian and there is no need to download and install the Ultra Librarian tool.

Figure 5

There is a selection button in the upper right corner of the page that can be used to select how the pin names are displayed:

Figure 6
When Pin name is selected, the pin names in the schematic package library are displayed according to the package name:
Figure 7. Pin name
If Project naming is selected, the pin names are displayed according to the assigned function names:

Figure 8. Project Name

If you select Dual, both the pin name and function name will be displayed:


Figure 9. Dual
After changing the above options such as pin name display, click the Refresh symbol previews button to refresh the display.

Figure 10. Download and refresh menu

There are two types of displays under the Footprint display of the PCB package library: Basic and Detailed. The Detailed display has more dimension annotations than the Basic display:

Figure 11. Basic and Detail display

Finally, we click the download menu shown in Figure 10 to download the library file.
If you select the pin name function definition display, a warning message may pop up first: Because the tool does not support some special characters, these characters will be replaced:
Figure 12. Special character replacement warning
Ignore this information and click Download anyway. Wait, the status bar under Refresh symbol previews will shake, and after a while it will show:


Figure 13. Select the target directory to download

Select the destination address to save the file on your computer.



0 3
Import the package file into the EDA tool to generate the package library

The downloaded UL generated files are not package library files that can be used directly by EDA tools, but some intermediate files that must be imported and converted in EDA tools before they can be used by EDA tools. Below we take the most commonly used Altium Designer and PADS as examples to illustrate this process.

3.1. Generating a Footprint Library in Altium Designer

We use Altium Designer 22.9 to demonstrate how to generate library files from files downloaded from CubeMX. The import process of different versions of AD tools may be slightly different.
Unzip the compressed file just downloaded from CubeMX. We can see a total of 6 files in the AltiumDesigner directory:

Figure 14

Open the AD software, open File -> Open in the menu bar, find the .prjscr project file in the unzipped file and open it


Figure 15. AD opens the project file
The project is opened as shown below:

Figure 16. The project after opening
Then run the script, File --> Run Script…


Figure 17. Running the script
Select UL_Form.pas in the pop-up window and click OK to run.

Figure 18. Select the file to run the script
Then another pop-up window will be generated. Choose to import the TXT file generated by the UL that you just unzipped and click Start Importing:

Figure 19. Select TXT file and import
After a while, you can see that the library file has been generated:

Figure 20. Generated LibPkg file The generated .pcblib library file needs to be closed and reopened before it can be viewed/used normally. Figure 21. Generated library file 3.2. Generate a package library in PADS Open the downloaded PADS package import file, and you can see that there are three files in the compressed package: Figure 22. PADS library import is relatively simple. Open PADS Layout, click the menu bar File --> Library, and the component library management box Library Manger pops up: Figure 23. Component Library Manager
In the component library manager box, select: Decals --> Import to import the pads.d file as shown in Figure 24 Parts --> Import to import the Pads.p file as shown in Figure 25 Logic --> Import Pads.c file as shown in Figure 26 After importing, click Open to generate the corresponding library file.

Figure 24. Importing the Decals package

Figure 25. Importing the Parts library

Figure 26. Importing Logic Library Figure 27. Generated Schematic Footprint Library

Figure 28. Generated PCB electrical footprint library



0 4
summary

The component packages downloaded using STM32CubeMX can free engineers from the tedious component package library design, especially when the number of pins is large. Many users have special requirements for the schematic package library's appearance, size, pin arrangement/naming, function arrangement, and PCB package pad size, solder mask design, character labeling, etc. The downloaded file effect may not meet all the requirements. These customers can make appropriate modifications to the downloaded file. This can avoid various errors that may occur in the process of designing a new package library, especially the common errors in PCB package size.

▼▼▼




·

© THE END


Click "Read original text" to learn more


Latest articles about

 
EEWorld WeChat Subscription

 
EEWorld WeChat Service Number

 
AutoDevelopers

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building,Block B, 18 Zhongguancun Street, Haidian District,Beijing, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号