This software is designed for TI SoCs with PRU-ICSS IP to enable IO-Link Master functionality. The FWHAL (Firmware Hardware Abstraction Layer) provides an interface between the IO-Link Master stack and the PRU-ICSS firmware.
The FWHAL module handles:
| Folder/Files | Description |
|---|---|
| ${SDK_INSTALL_PATH}/examples/industrial_comms | |
| iolink_master_demo | IO-Link Master Example Application |
| ${SDK_INSTALL_PATH}/source/industrial_comms/iolink | |
| icss_fwhal/firmware | Firmware binaries for the PRU cores in PRU-ICSS |
| icss_fwhal/lib/ | FWHAL library for IO-Link Master |
| icss_fwhal/iolfw.h | FWHAL public API header |
| icss_fwhal/iolfw.c | FWHAL implementation |
| icss_fwhal/iolfw_internal.h | FWHAL internal definitions |
| stack | IO-Link Master stack header files and library |
| Abbreviation | Expansion |
|---|---|
| PRU-ICSS | Programmable Real-Time Unit Industrial Communication Subsystem |
| FWHAL | Firmware Hardware Abstraction Layer |
| SDCI | Single-drop Digital Communication Interface (IO-Link mode) |
| SIO | Standard Input/Output (legacy digital I/O mode) |
| COM1 | IO-Link baud rate 4.8 kbaud |
| COM2 | IO-Link baud rate 38.4 kbaud |
| COM3 | IO-Link baud rate 230.4 kbaud |
| T_A | Time for device response (max response time) |
| IEP | Industrial Ethernet Peripheral (timer unit in PRU-ICSS) |
Please see IO-Link FWHAL for API documentation. It is recommended to use these FWHAL APIs in the stack porting layer.
The FWHAL provides a hardware abstraction layer that allows third-party IO-Link Master stacks to interface with TI PRU-ICSS hardware. This section describes the initialization sequence and key APIs for integrating any IO-Link Master stack with the FWHAL.
Register callback functions (must be done before IOLFW_init()):
Each registration API requires a function pointer that FWHAL will call when the corresponding event occurs:
IOLFW_init():PRUICSS_open()IOLFW_setPortMode():IOLFW_ePortMode_Sdci (IO-Link), IOLFW_ePortMode_SioInactive, etc.IOLFW_wakeUp():IOLFW_transferPrepare() to queue TX data before each transferThe IOLFW_configCycleTime(pInstance, port, timeUs) API is the primary interface for configuring the cycle timer. It automatically manages timer state and provides a simplified interface:
Parameters:
pInstance - FWHAL instance handleport - Port number (0-7)timeUs - Cycle time in microseconds (0 to disable)Internal behavior:
timeUs > 0 and timer already active:IOLFW_setCycleTime() to update the cycle periodtimeUs > 0 and timer not active:IOLFW_resetCycleTime() - Resets counter to 0IOLFW_setCycleTime() - Sets new cycle periodtimeUs == 0:This single API eliminates the need to manually track timer state or call multiple configuration functions.
IO-Link firmware generates the following interrupts:
| Name | Host Interrupt | Callback Registration | Description |
|---|---|---|---|
| Wake-up Complete | PRU_EVTOUT0 | IOLFW_registerStartupCmplCallback() | Notifies host when wake-up sequence completes on a port |
| Transfer Complete | PRU_EVTOUT1 | IOLFW_registerTransferIndCallback() | Notifies host when an IO-Link transfer (TX/RX) completes |