Adding Expansion Headers to a custom board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding Expansion Headers to a custom board

Adding Expansion Headers to a custom board

 

The Expansion headers feature in MCUXpresso Config Tools simplifies the usage of the Pins tool in several ways. It is easier to find appropriate pins on the board and configure them for usage in a user application. The pins can also be automatically routed by applying the expansion board file. This document describes how to add or modify the expansion headers if you are designing or using your own PCB board leveraging standard expansion headers such as those compatible with Arduino. 

1. Introduction  

1.1 Expansion header  

An expansion header is a collection of expansion connectors placed on the development board. The pins from the connectors lead out the processor pins outside and can be identified by a label on the board. There can be multiple expansion headers on a single board.  

Ana_0-1645126067802.png

Figure 1. Example of three expansion headers on- LPC55S69-EVK board 

1.2 Expansion board  

An expansion board is a circuit board that can be applied to the Expansion header, extending features of the development board. Expansion boards (sometimes called Shields) can contain special additional components such as wireless modules, sensors, and so on. The connected pins may have different names on the expansion board.   

If an expansion header is defined in the configuration, then the pins tool can provide instant routing of the processor signals appropriate for the expansion board applied to this header.  

Ana_1-1645126067804.jpeg

Figure 2. Expansion board example - Tester click[https://www.mikroe.com/tester-click] 

1.3 Expansion Headers in Pins tool 

The Expansion Header view can be found in the Pins tool. The view shows the header connectors and pins in graphical form, with the layout corresponding to the layout of the real board.

Ana_2-1645126067805.png

Figure 3. Expansion Header view 

The Expansion Header view can simplify work with the pins connected to an expansion header. By moving the cursor on a connector pin, you can see the details on the pin's connection and routing. You can also route processor pins signals by left-clicking on the connector pin or by right-clicking to invoke the context menu. 

The default new configurations created by MCUXpresso config tools for common evaluation boards already contain pre-populated expansion header(s) matching the expansion headers on the board that can be used out-of-box. 

2. Adding Custom Expansion header  

When the expansion header is not present in the configuration, or you would like to add an additional expansion header. 

  1. Open or create the configuration where you would like to add an expansion header in the Pins tool.
  2. Open the Expansion Header view if it is not open.
    • In the standalone MCUXpresso Config tools, select the command Views > Expansion header 
    • In the MCUXpressso IDE, select command Window > Show view > Expansion Header 
  3. Click the Add button in the Expansion Header view toolbar.Ana_17-1645126768261.png


         Figure 4. expansion header Add button 

  4. The Expansion Header dialog appears
    • Set the header name, type, and connector names to match your hardware design.
      Ana_4-1645126067807.png 

           Figure 5.  Add New Expansion Header dialog 

               NOTE: The number of connectors and arrangement is determined by the header type. 

      Ana_5-1645126067808.png

          Figure 6. Example of the header types (orange: Lpc-style arduino; red: Pmod; green: Micro Bus)

    • The values can be changed in the future in Edit Header 

 The created header initially contains only the disconnected pin that must be defined before it can be used in the configuration. For more information, see subchapter Connecting pins. 

Note: The customized headers and their connections are saved to the configuration MEX file and in the YAML block within the generated source files, so they are not lost when you distribute the configuration to someone else. 

Ana_6-1645126067810.png

 Figure 7. Custom header in the source code 

 2.1 Connecting pins 

The newly created custom expansion header does not contain any connected pins.   

There are two ways to connect or disconnect a pin:  

  • Dialog in the Expansion Header view
    1. Click the Connect command in the context menu of the connector pin.
      Ana_7-1645126067811.png 

        Figure 8. Connect command in the context menu

    2. The Connector Pin dialog is shown

      Ana_8-1645126067812.png
        Figure 9. Connect dialog for the 3-d pin on connector “mA”, set name “mPin” and connected to processor pin on coordinates 26 

    3. You can set the name (for example, the label of the pin on the header); otherwise, the connector pin coordinates will be used instead. 
    4. If the pin is connected to the processor, check the checkbox connected with the processor pin. In this case, check the connected pin checkbox from the list.
    5. If the connector pin is used but is not connected to the processor, you can select external signal types, which will be used for validating features of the matching signals when the expansion board is applied to the header.
    6. You can also disconnect the pin by unchecking all the checked items. 
  • It is also possible to connect Connector pins via the Pins view, see below. 

 3. Connections in the Pins view  

The connections of each expansion header/board are also shown as a separate column in the Pins view.   

The fields at processor pin rows that are filled contain a reference to the connector, the pin number and may contain a label specific for the expansion header. For example, P19[4] (A1) connects the processor pin to connector P19, pin number 4, and the label on the expansion header is A1.  

Ana_9-1645126067812.png

  Figure 10. Expansion headers/boards in the Pins view 

 Steps to connect connector pins in this view: 

  • Find the cell, where the row is the processor pin you would like to connect, and the column is the expansion header to connect to. 
  • The connection is made by setting cell value in the connector pin coordinates format “connector name”[“number of the pin”]. If you want to add an optional name, you append the name in parentheses. 
    Note: The external signal types of the connector pin cannot be set here. 
  • The value is checked for the correct format, which  is described within the tooltip shown for the cell 
    Ana_10-1645126067813.png
      Figure 11. Validation tooltip with advice for the header "My custom header" 
  • Disconnecting can be done by deleting the cell value 

  3.1. Applying/Removing expansion board  

If you have an expansion board definition file, you can apply it to the selected expansion header. After the application, the pins tool suggests routing for all used signals and it is possible to see the usage and corresponding board signals for the expansion board.  

The expansion board is distributed as a simple .xml file. The type of expansion header must match the expansion header definition, other headers cannot be used. For details on the expansion board definition file, see the following article: Creating expansion board definition file for Arduino Multifunction shield

To apply an expansion board, use the following steps: 

  1. In the expansion header view, select the plus button in the right part of the Expansion Header view toolbar.
    Ana_11-1645126067813.png Figure 12. Expansion board add button 

      You can also use the path Main menu Pins > Apply expansion board, where you can choose the expansion header.  
    Ana_12-1645126067814.png
     Figure 13. Apply MikroE Tester click board for a micro bus header type 

  2. After clicking OK, the Expansion Board Routing dialog appears 
    Ana_13-1645126067814.png

     Figure 14. Expansion board routing open after applying the expansion board 

  3. In the dialog box, you can choose which pins function group the routing will be applied to.

    • The routing dialog contains routing tables, where processor pins are pre-autorouted based on the limitations of the expansion board. The routing is validated in real time and can be changed by clicking a cell in the Route column.  
    • You can also decide if and what pin name will be used for the generation of the defined constants in the code for referencing from the application. 

      Ana_14-1645126067815.png
        Figure 15. Generated #define for board MIKROE and pins AN, CS 

    • The same dialog appears after clicking the edit expansion board in the Expansion header view, but the option to create a new functional group will not be enabled.  Ana_15-1645126067816.png

      Figure 16 Expansion board edit button 

 NOTE: Removing expansion board does not remove configured routing. It only changes the identifier defines if they are derived from the board.  

Ana_16-1645126067817.png

Figure 17. Source code change after removing  the expansion board 

 

 

No ratings
Version history
Last update:
‎02-18-2022 08:59 AM
Updated by:
NXP Employee