[SOLVED] Pin functions in SchLib - awkward editing - Page 1
Forum section: electronics / general

author: cowboy_movie_fan
author_rank: Newbie
timestamp: June 30, 2023, 02:53:48 pm
content: I recently discovered a cool feature in the SchLib editor (AD 23.5 but probably earlier too)When editing a pin in Schlib there is a field called functions with a question mark next to it.It can be used for MCU's with lots of alternate functions on a single pin. e.g. pin33 name = PA11 and alternate functions like TIM3_CH1 , USART3_TX ,CAN_TX or whatever.so you enter all these funcions in the aformentioned field and hit the + button next to it.Okay now when you place this symbol in your schematic , you will see Pin 33 listed as PA11 but it looks a bit different than usual , and if you click on it you can enable the text's by selecting radio buttons and they will show up in your schematic symbol. That's cool , you only show what's relevant and keep you schematic clean and readable ,and at the same time you can check if the function you selected for this pin really exists.So far, so good , but editing these functions ,only goes one by one ! I can copy / paste entire pinlists in the Schliblist , but not these functions! It takes a lot of time to make a good MCU symbol.Took me 5 hours for a 100pin MCU ,an average of 5 alternate functions means 500 ctrl-C and 500 ctrl-V 'sgenerally i convert the pages of the datasheet PDF to XLS with some online converter ant then clean it up.copy and paste the pinlist directly to the Schliblist spreadsheet and your done. but these really cool alternate functions have to be done one by one.For STM32 MCU's you can export a pin list directly from STM32CUBE_MX into csvHas anyone figured out a way to do it in batch mode?

author: asmi
author_rank: Super Contributor
timestamp: July 02, 2023, 08:12:36 pm
content: This is a relatively fresh addition, so I expect few more iterations down the line before they make it more useable. I did this by hand as well for one of MCUs, but I think as it is it's simply not worth the trouble.

author: mkissin
author_rank: Regular Contributor
timestamp: July 02, 2023, 11:27:29 pm
content: I'm not sure it completely solves this for you, but the documentation:https://www.altium.com/documentation/altium-designer/new?version=22&check_logged_in=1#!CustomNamesForMultiFunctionalPinsindicates that the symbol wizard will take pin names with embedded slashes "/" and convert these to alternate functions.

author: thm_w
author_rank: Super Contributor
timestamp: July 03, 2023, 09:56:50 pm
content: Yeah, not really worth your time to document all these pin functions, it can even work against you sometimes.Select which pin to use from cubemx, as that will handle pin conflicts. If you choose first in your schematic, you might find yourself using pins that are not actually available.You could screenshot the datasheet, cubemx, or one of those pinout diagrams someone has made and paste it into your schematic for reference though.

author: cowboy_movie_fan
author_rank: Newbie
timestamp: July 04, 2023, 07:19:27 pm
content: @mkissin : Ah the symbol wizard , i never use it. but if it fixes this. will try tomorrow.@thm_w: I am certainly not planning to make the pin selection in the schematic. as you said it might end up with some impossible combinations , at leas for ST MCU's. It's more that I want my schematics to be a readable as possible.So i select the correct function afterwards in the schematic.

author: cowboy_movie_fan
author_rank: Newbie
timestamp: July 06, 2023, 06:54:34 pm
content: The symbol wizard CAN accept paste from clipboard for all pins together. Wow! problem solved.This way it's almost effordless. thanks@ mkissin

author: RetireMeNow
author_rank: Newbie
timestamp: June 20, 2024, 06:27:57 am
content: My process is as follows:1) Get the pin alternate names by exporting from STMCube to CSV (or copying off datasheet).2) Use a concat formula in excel to add in the "/" where required.3) Setup a new symbol with the correct number of pins you have and select all the pins.4) Open up the schlist panel and sort by designator.5) Copy and paste in the concatenated names.6) Open the symbol wizard and re-place the symbol.7) Change the display name in the schlist or directly in each pin to the default name, usually it's GPIO or Power pins. This is what will show in the symbol library. If you don't do this your symbol in the library will be a mess.7) Place the symbol in schematic and turn on/off the relevant functions to suit your design.Notes: The schlist on its own won't work to paste in the alternate functions hence why you need to do this in two steps. Schlist, then symbol wizard.This is because the Symbol wizard will not sort nicely. It sorts as 1,10,11,12 rather than 1,2,3 etc which the schlist does.Annoyances:If you define pin electrical type / description / IEEE symbols etc then those have to be manually updated. I'm ok with that as the value is in the ability to 'see' the alternates if needed and only show the one you are using making the schematic more readable.