How to assign nodes to pins

nRF Connect for VS Code

tags
nRF Connect for VS Code

To assign a node to a pin, complete the following steps:

  1. Open the Pins View using the switch at the bottom right corner of the Editor.
    View switch
  2. Click the pin to which you want to assign a node.
    The Pin Overview is updated.
    Pin Overview
  3. Click the Add Assignment button.
    The assignment menu appears.
    Add pin assignment
  4. Select the options for the node from the available menu fields.
  5. Click Assign.
    The extension assigns the pin to the node if it is possible. Otherwise, a warning is displayed and the assignment is cancelled.
  6. If the assignment was successful, complete the following steps:

    1. Check for any assignment issues in the Problems panel in the Visual Studio Code's Panel Views.
    2. 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 to see the tooltip with the list of available assignments, including the respective node, function, and state.