To start working with the IO-Link Master, you need the software Code Composer Studio™(CCS).
This example has been compiled and tested with the following versions:
Software Package | Version |
---|---|
Code Composer Studio™(CCS) | 12.7.0 |
MCU+ SDK | 09.02.00.49 |
TI ARM clang | 3.2.2.LTS |
SysConfig Tool | 1.20.0 |
Importing the project into your CCS workspace
CCS automatically builds the project, connects to the Master,
transfers the compiled binary project data into the Master's RAM and starts a debugging session.
When the transfer is complete the debugger halts at the main() function.
Be aware that the IO-Link AM437x IDK Main Board revision differs from the regular IDK
and does not support SD storage.
To run your code without the CCS debugger, you need to manually flash the compiled binary data
(including a compatible bootloader) into the devices QSPI attached flash memory.
(See Flash a Hello World example)
This example runs the Master stack functions in its own separate task. This task initializes
all needed interfaces and then executes the IOLM_exampleRun() function in an endless loop.
The IOLM_exampleRun() function is located in the ExampleSMI.c file,
where it is possible to add or modify code to fit the desired environment.
For details see Non-volatile Storage (NVRAM) Hardware Driver.
To use a customized PRU firmware, simply reference the binaries in the iolmPruExampleConfig structure in main.c, as can be seen in the example below:
The IO-Link Master GUI can be used to connect to the IO-Link Master's
Standardized Master Interface (SMI) via USB , to set up configuration parameters,
read status information and communicate with attached IO-Link devices.
Now one can connect a micro USB cable to the UART USB port (J26) of the AM64x EVM.
In the Std Port Config tab the configuration and status of the Master's ports
can be read and changed.
You can retrieve the Master's current port configuration and port status
by clicking the corresponding buttons.
The default setting sets all ports except the first one (port number: 0) to DEACTIVED.
Port 0 is by default set to IOL_AUTOSTART, which starts an auto-detect-sequence.
For more details on port modes see the section Set up IO Link Port
and the IO-Link Specification v1.1.3.
After changing the Master's port configuration it will be saved in its internal
non-volatile memory and remain even after restarting or turning it off.
To connect a device to a certain port, its mode has to be changed to IOL_AUTOSTART.
In the On Request Data tab you can request Indexed Service Data Units (ISDUs)
from the device or send ISDUs to the device.
For more information on ISDUs see the IO-Link Specification v1.1.3.
It is possible to import IO Device Description (IODD) files for ones connected devices
in the Std Port Config tab. This makes it easier to read and set device parameters.
For more information on IODD files see the IO-Link Specification v1.1.3 and the IODDFinder.