Alternate pin assignment

Hello!

I have notice a (probably) new feature: alternate pin assignment.
I have created a new device and noticed that there is an “alternate pin assignments” tab
when I open the symbol properties.
Then I thought I have to add the alternate pin definitions when creating the symbol.
Back to the symbol editor, I noticed that it’s possible for every pin to add alternate defintions,
and I tried to do it. Example: Pin 1 was defined as P6.4 / A4. Port IO or analog input.
So I left P6.4 as default and added A4 for alternate. Saved, updated in the schematic editor.
Now when I open the symbol properdies, I was expecting to see P6.2 on the base name
column, and A4 as an alternate, but it didn’t change. Here are a few questions:

  1. Did I miss one (a few) step(s)?
  2. In symbol properties, Alternate Assignment has only one column. What will happen if there
    is more than one alternate assignments? Example: pin 76 is P10.0 or UCB3STE or UCA3CLK.

Thanks for any hint!

R.

I haven’t investigated this feature but could you be misinterpreting the purpose? Could it be for representing devices that come in say 40 pin DIP and 44 pin TQFP?

@retiredfeline It is just to assign alternate pin texts. Comes in handy for e.g. MCUs, where a pin can be GPIO/UART/SPI/Analog5, you get it. You can choose which pin name you want displayed.
[EDIT] Electrical type and graphical style change as well

3 Likes

There will be a dropdown list with the alternates available.
Initially, you see an empty field. Only after clicking it does the dropdown list appear.

It’s there since 6.0.

Hello!

Thanks, that’s exactly what I expected.
Instead of displaying up to 5 ~ 6 different options, it would be a lot better to display tje pin I’m actually
using, for instance only UART_TX as in your example. And I would also like to add an NC option.

Anyway I must be missing something. I configured it my lib and it doesn’t reflect in the schematic
even if I update the lib.

Ok, I will be a bit more specific. I’m making a new symbol for MSP430F5438, an older beast.


Pin 1 is port 6.4, and its alternate usage is analog 4. I have therefore renamed P6.4/A4 to P6.4
and added an alternate pin name, A4 which is an input only (ADC input).

Now in the schematic I had started, if I update the library, I can be sure that it has actually been
upgraded since the corner pin 1 is now P6.4, and the A4 has disappeared.

Now my problem is: how can I do in the schematic to show the alternate pin name, A4 only?

Thanks for any hint.

R

Update: I found the trick!

The first image below shows an empty row in the alternate assignments.
But by clicking as mentioned above, there is indeed a menu. Might be good to add something like
“click to change default” or something like that. But maybe it’s only me…
Here is the selector pane, and a view of the result.

Screenshot from 2023-02-23 16-04-54

1 Like

Oopsy Daisy, I never realized that…

You are mis-using or mis interpreting the feature.
It’s not used for all schematic symbols. KiCad’s libraries are a bit behind. The intention is that all sensible pin names are pre-defined in the library, and you choose one of the names for use in your schematic. To see how it works put one of the STM32 IC’s on your schematic, and then edit it’s properties. Then you can select a name from the Alternate Pin Assignments tab page.

This seems to work quite nicely for microcontrollers and other IC’s that have a limited number of pre-defined functions per pin. It does not work for FPGA’s or PLD’s where pins can be “anything”. But I don’t see much room for improvement there, except for just improving the symbol editor itself. It’s easy enough to pop a symbol into the symbol editor and change pin texts to your liking. And having a pre-defined symbol already defines the power pins, maybe clock and other dedicated pins and just leaves the I/O pins to change for you.

1 Like

For me it seems finally a problem for the database approach. Pin names (and pin numbers) should be possible to override either from database or manually by schematic entry. Swapping rules should be either connected to in number or pin name or any new identifier therefore.

Hello!

I don’t think so. By the way, my post above was maybe a bit confusing with the latest picture
showing a chip with only pin 1 using this feature. I’m in the process of changing them all, but
it takes time. With, say, 3 different configs for each pin in an average, it means 300 editions
for this QFP100.
Beside this, since it’s now able to define not only the alternate pin name, but also its nature
(input / output / bidirectional, etc…), I think Kicad is now able to detect errors that could not be
detected earlier. I’m aware of how STM32 cube works, and I remember having asked for this
feature, maybe a couple of years ago.
Anyway, to summarize, it’s perfect, and the only possible improvement would add a text when
no alternate name is selected, as mentioned above. Like “select alternate name”.
And while we are at it, it’s not realy a matter of name, but also functionality, so “select alt pin function”
could be even better.

R

Hello!

Back after some time. I’m trying to use what I did earlier, and in fact I’m not sure that this new
functionality is an advantage. The problem is that now I have a symbol with a single label (I mean
the functionality, like P6.5). This means that if I want to use for instance the A5 functionality
(analog 5. which is on the same pin as P6.5), then I have to know where it is. This one is simple,
Port6 is analog for all the MSP430s. So P6.x van also be remap tp A6.
Now what should I do if I don’ t know for instance the location of UART2?
Opening a pdf is certainly a solution, but It would be good if I could search from the schematic editor.
For instance, right click on the component, have a “find” menu in which I would key in “UART2”

Is there an existing method? The alternate pin panel is apparently not searchable. At least not
with the standard cmd-F.

Thanks,

R

You could define all the main ones as the default, like below, and select desired one later (symbol get kinda big though).
Then, in your alt selection you can also add a note for later programming, such as
default is: PA5/SPI1_SCK/ADC2_2/DAC1_2
but you select: SPI1_SCK (GPIO_AF_5) so you know what alt-function code to use.

Hello!

Thanks for your reply. Yes, that’s what I ended up doing. I have also added a NC option for all the pins so that the schematic better retlects what I do.

R

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.