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.
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.
Figure 1. Example of three expansion headers on- LPC55S69-EVK 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.
Figure 2. Expansion board example - Tester click[https://www.mikroe.com/tester-click]
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.
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.
When the expansion header is not present in the configuration, or you would like to add an additional expansion header.
Figure 4. expansion header Add button
Figure 5. Add New Expansion Header dialog
NOTE: The number of connectors and arrangement is determined by the header type.
Figure 6. Example of the header types (orange: Lpc-style arduino; red: Pmod; green: Micro Bus)
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.
Figure 7. Custom header in the source code
The newly created custom expansion header does not contain any connected pins.
There are two ways to connect or disconnect a pin:
Figure 8. Connect command in the context menu
Figure 9. Connect dialog for the 3-d pin on connector “mA”, set name “mPin” and connected to processor pin on coordinates 26
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.
Figure 10. Expansion headers/boards in the Pins view
Steps to connect connector pins in this view:
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:
You can also use the path Main menu Pins > Apply expansion board, where you can choose the expansion header.
Figure 13. Apply MikroE Tester click board for a micro bus header type
Figure 14. Expansion board routing open after applying the expansion board
In the dialog box, you can choose which pins function group the routing will be applied to.
Figure 15. Generated #define for board MIKROE and pins AN, CS
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.
Figure 17. Source code change after removing the expansion board