Author Topic: [SOLVED] Pin functions in SchLib - awkward editing  (Read 1693 times)

0 Members and 1 Guest are viewing this topic.

Offline cowboy_movie_fanTopic starter

  • Newbie
  • Posts: 3
  • Country: be
[SOLVED] Pin functions in SchLib - awkward editing
« on: June 30, 2023, 02:53:48 pm »
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 's

generally 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 csv

Has anyone figured out a way to do it in batch mode?
« Last Edit: July 06, 2023, 06:55:45 pm by cowboy_movie_fan »
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2752
  • Country: ca
Re: Pin functions in SchLib - awkward editing
« Reply #1 on: July 02, 2023, 08:12:36 pm »
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.
 
The following users thanked this post: thm_w

Offline mkissin

  • Regular Contributor
  • *
  • Posts: 118
Re: Pin functions in SchLib - awkward editing
« Reply #2 on: July 02, 2023, 11:27:29 pm »
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#!CustomNamesForMultiFunctionalPins
indicates that the symbol wizard will take pin names with embedded slashes "/" and convert these to alternate functions.
 
The following users thanked this post: cowboy_movie_fan

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: Pin functions in SchLib - awkward editing
« Reply #3 on: July 03, 2023, 09:56:50 pm »
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.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline cowboy_movie_fanTopic starter

  • Newbie
  • Posts: 3
  • Country: be
Re: Pin functions in SchLib - awkward editing
« Reply #4 on: July 04, 2023, 07:19:27 pm »
@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.
 
The following users thanked this post: thm_w

Offline cowboy_movie_fanTopic starter

  • Newbie
  • Posts: 3
  • Country: be
Re: Pin functions in SchLib - awkward editing
« Reply #5 on: July 06, 2023, 06:54:34 pm »
The symbol wizard CAN accept paste from clipboard for all pins together. Wow! problem solved.
This way it's almost effordless. thanks@ mkissin
 

Offline RetireMeNow

  • Newbie
  • Posts: 4
  • Country: nz
Re: [SOLVED] Pin functions in SchLib - awkward editing
« Reply #6 on: June 20, 2024, 06:27:57 am »
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.



« Last Edit: June 20, 2024, 06:39:24 am by RetireMeNow »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf