This procedure is only available to nodes that have pins.
To assign a pin to a node, complete the following steps:
- Open the Peripherals View using the switch at the bottom right corner of the Editor.
- Select the node you want to assign to a pin. You can do this from the Peripherals View or from the Nodes View. The Nodes View list is more comprehensive. In the example below,
&spi20has been selected undersoc/&global_peripherals, which is not present in the Peripherals View.
The Node Inspector panel is updated.
- In the Pins properties, make sure that the node you are assigning to a pin is enabled. If not, click the Enable Node button.
The Pins properties are updated and the node tile is added to the Peripherals View.
- In the Pins properties, assign the node property to a pin by selecting it from the drop-down menu.
The selection is mirrored in the Peripherals and Pins Views..
-
If the node has pins that are unavailable for assignment to nodes, but you want to assign them, click the Add Pin State button to add the pin control state.
.
The custom pin control state is added and automatically enabled, and the pin can now be assigned to a node. In the following example,EnabledandDisabledpin states were added.
.
-
Check for any assignment issues in the Problems panel in the Visual Studio Code's Panel Views.
- Save your changes either in the editor or in the devicetree file.
The node is assigned to the chosen pin and the change is mirrored in the devicetree code file. You can hover over the pin in the Pins View to see the tooltip with the list of available assignments, including the respective node, function, and state.