cancel
Showing results for 
Search instead for 
Did you mean: 

Move or copy/paste pin configurations?

Is it possible to move and/or to copy/paste pin configurations from one pin to another?

If yes, how?

If not - feature suggestion!

1 ACCEPTED SOLUTION

Accepted Solutions
Ghofrane GSOURI
ST Employee

Hello @Andrew Neil 

Yes, it is possible to move pin configurations in STM32CubeMX. Here’s how you can do it:

  1. Select the Pin: Click on the pin you want to move.
  2. Hold Control Key: Press and hold the Ctrl key on your keyboard.
  3. Drag the Pin: While holding the Ctrl key, click and drag the pin to the new location where you want to move it. The target pin will highlight, indicating that it can accept the configuration

THX

Ghofrane

View solution in original post

7 REPLIES 7
Ghofrane GSOURI
ST Employee

Hello @Andrew Neil 

Yes, it is possible to move pin configurations in STM32CubeMX. Here’s how you can do it:

  1. Select the Pin: Click on the pin you want to move.
  2. Hold Control Key: Press and hold the Ctrl key on your keyboard.
  3. Drag the Pin: While holding the Ctrl key, click and drag the pin to the new location where you want to move it. The target pin will highlight, indicating that it can accept the configuration

THX

Ghofrane

Thanks.

How about to copy a pin?

eg, you're setting up a group of LEDs:  apart from the name, the settings would be the same on every pin - so you'd just want to set the first, then copy to the others ...

Hello @Andrew Neil 

Unfortunately, STM32CubeMX does not have a direct "copy" feature for pin configurations. Here are some key reasons:

  1. Complexity of Configuration: Each pin on an STM32 microcontroller can serve multiple functions, depending on the selected peripherals. This means that copying configurations directly could lead to conflicts or unintended consequences if the same pin is used for different purposes in different contexts
  2. User Management of Pins: The tool is designed to encourage users to explicitly define the configuration for each pin, which helps avoid errors associated with automatic copying. This manual approach ensures that developers are aware of the specific settings and functions assigned to each pin, promoting better understanding and control over the hardware configuration

Yes, but don't those same issues apply to moving a pin configuration?

 

 but don't those same issues apply to moving a pin configuration?

Hmm. Moving means that you have a function assigned to a pin and want to move it to another [compatible] pin. This is a common situation. Just cloning a pin to many others - less common. What do you want to copy: speed? pull-up/pull down? name?

 


@Pavel A. wrote:

Just cloning a pin to many others - less common.


Really?

The example of having a number of LEDs must be quite common.

Similarly a number switches.

 

I'm not convinced )) If you have more than (say) 50 LEDs or switches there is going to be some external controller with low pin count interface (in which every pin is individual). Otherwise it doesn't scale. Less than 20-30 pins one can set up manually.