IO-Link Master  1.03.03
IO-Link Master Port Definitions

Overview

IO-Link Master Port Definitions.

Macros

#define IOLM_PORT_COUNT   8
 Number of ports, which are operated by the IO-Link Master.
 
#define IOLM_SMI_ENABLED   1
 Enable SMI. More...
 
#define IOLM_SYSTICK_INTERVAL_MS   1
 Interval of the SysTick timer in milliseconds. More...
 
#define IOLM_WAKE_RETRY_TIMEOUT   40
 Retry interval of wake-up sequence. More...
 
#define IOLM_MASTER_PROCESSING_TIME   400
 Mainloop time. More...
 
#define IOLM_MASTER_RETRY_INTERVAL   600
 Wakeup Sequence Retry Interval should be 500 to 1000ms. More...
 
#define IOLM_IRQ_PROCESSING   1
 Process cyclic frames in IRQ context and not in Mainloop. More...
 
#define IOLM_DS_ENABLE   1
 Enable the Data Storage mechanism.
 
#define IOLM_PHY_FRAMEHANDLER   0
 Support configuration interface for external Phy frame handler.
 
#define IOLM_PHY_CYCLETIMER   1
 Support configuration interface for external Phy cycle timer.
 
#define IOLM_ADDITIONAL_MSEQ_TIMEOUT   0
 Increase the MSeq timeout by n microseconds. More...
 
#define IOLM_CYCLE_JITTER_US
 Cycle jitter value. More...
 
#define IOLM_PD_BUFFER_COUNT   3
 Number of Process Data buffers. More...
 
#define IOLM_CRITICAL_DECL(level)
 This macro is used to declare a state variable to store a state in critical section. More...
 
#define IOLM_CRITICAL_DECL(level)
 This macro is used to declare a state variable to store a state in critical section. More...
 
#define IOLM_CRITICAL_START(level)
 This macro is used to enter a critical section. More...
 
#define IOLM_CRITICAL_START(level)
 This macro is used to enter a critical section. More...
 
#define IOLM_CRITICAL_END(level)
 This macro is used to leave a critical section which was entered by #IOLD_CRITICAL_END. More...
 
#define IOLM_CRITICAL_END(level)
 This macro is used to leave a critical section which was entered by #IOLD_CRITICAL_END. More...
 
#define IOLM_PD_CYCLE_IRQ   0
 PD cycle indication as fast as possible *. More...
 
#define IOLM_WAKEUP_PULSE_TIMER_US   75
 Wake-up pulse timer length in microseconds (pulse needs to be 75-85 us). More...
 

Macro Definition Documentation

◆ IOLM_ADDITIONAL_MSEQ_TIMEOUT

#define IOLM_ADDITIONAL_MSEQ_TIMEOUT   0

Increase the MSeq timeout by n microseconds.

This is an additional time between the the receive of the last byte in a frame and start of the next frame. Increasing this, reduces the min cycle time, but also makes the communication more reliable on multi port implementation or heavy interrupt load.

◆ IOLM_CRITICAL_DECL [1/2]

#define IOLM_CRITICAL_DECL (   level)

This macro is used to declare a state variable to store a state in critical section.

This is done if a critical section is entered by #IOLD_CRITICAL_START or leaved by #IOLD_CRITICAL_END. If no state save is required, this function can be empty

◆ IOLM_CRITICAL_DECL [2/2]

#define IOLM_CRITICAL_DECL (   level)

This macro is used to declare a state variable to store a state in critical section.

This is done if a critical section is entered by #IOLD_CRITICAL_START or leaved by #IOLD_CRITICAL_END. If no state save is required, this function can be empty

◆ IOLM_CRITICAL_END [1/2]

#define IOLM_CRITICAL_END (   level)

This macro is used to leave a critical section which was entered by #IOLD_CRITICAL_END.

If required a state can be restored by level.

◆ IOLM_CRITICAL_END [2/2]

#define IOLM_CRITICAL_END (   level)

This macro is used to leave a critical section which was entered by #IOLD_CRITICAL_END.

If required a state can be restored by level.

◆ IOLM_CRITICAL_START [1/2]

#define IOLM_CRITICAL_START (   level)

This macro is used to enter a critical section.

In this section should the application don't call Stack routines in interrupt context. This can be done by disabling the interrupts. If some state need to be restored later, it can be saved in the level variable.

◆ IOLM_CRITICAL_START [2/2]

#define IOLM_CRITICAL_START (   level)

This macro is used to enter a critical section.

In this section should the application don't call Stack routines in interrupt context. This can be done by disabling the interrupts. If some state need to be restored later, it can be saved in the level variable.

◆ IOLM_CYCLE_JITTER_US

#define IOLM_CYCLE_JITTER_US
Value:
IOL_BIT_USEC(0, IOL_BAUD_COM1), \
IOL_BIT_USEC(0, IOL_BAUD_COM2), \
IOL_BIT_USEC(0, IOL_BAUD_COM3)

Cycle jitter value.

This value is to adjust the cycle jitter into a valid range. According specification a cycle time with +0% to +10% is allowed. The stack tries to reach the 0%. If the output driver jitters, it is possible that the cycle time is below 0%. For this an additional time in microseconds can be added by this value. There are values for COM1, COM2, COM3. The value can also be negative (useful for COM3).

◆ IOLM_IRQ_PROCESSING

#define IOLM_IRQ_PROCESSING   1

Process cyclic frames in IRQ context and not in Mainloop.

If this value is set, the interpretation of the Rx frame is done in the function IOLM_API_PL_vTransferInd() and the transmit frame is prepared in the function IOLM_API_vTimerExpired(). This functions normally run in interrupt context. With this mode are short cycle times possible (400 us) but with the cost of a higher interrupt load. It ensures also that always the most recent Process Data is available in both directions.

If this value is set to zero, the frame processing and preparation is done in the Mainloop. Interrupts are only used to indicate events and trigger the start of data. This mode decreases the jitter on the line, allows more Devices, but with the cost of slower cycle times (>= 1ms) and a output Process Data delay on very slow sensors (cycle time > 20ms). This is because the Tx frame is prepared if the last frame is received and transfered on the next cycle interrupt.

◆ IOLM_MASTER_PROCESSING_TIME

#define IOLM_MASTER_PROCESSING_TIME   400

Mainloop time.

Master processing time is the maximum time between receiving data (Rx complete interrupt) and the next Mainloop processing in microseconds.

This value should be set to the maximum interval between two IOLM_API_vRun calls.

If IOLM_IRQ_PROCESSING is enabled, this value equals the minimum cycle time of the Master. If not, the minimum cycle time of the Master is this processing time + the message sequence time on the line.

◆ IOLM_MASTER_RETRY_INTERVAL

#define IOLM_MASTER_RETRY_INTERVAL   600

Wakeup Sequence Retry Interval should be 500 to 1000ms.

see table 40 of IO-Link Specification v1.1.2

◆ IOLM_PD_BUFFER_COUNT

#define IOLM_PD_BUFFER_COUNT   3

Number of Process Data buffers.

Depending on the consistency requirements, different values can be selected. Valid values:

  • 1: Input data is only valid during IOLM_Port_AL_vNewInput() call. Output data has to be set in IOLM_Port_AL_vPDCycle().
  • 2: Ping Pong Buffer. Input data can be read every time and is valid at least one IOL cycle. Output data can be set once during a cycle.
  • 3: Input data is valid until next call of IOLM_API_AL_eGetInput(). Output data can be set every time.

◆ IOLM_PD_CYCLE_IRQ

#define IOLM_PD_CYCLE_IRQ   0

PD cycle indication as fast as possible *.

If this value is set, the functions IOLM_Port_AL_vPDCycle and IOLM_Port_AL_vNewInput() are called in the receive functions of the stack. This can be in interrupt context. If the user application needs a lot of time, this can delay the IO-Link cycle. It should be used if the user application needs the Process Data as fast as possible.

If the value is set to 0, the functions are called in the following Mainloop call and not in interrupt context. It guarantees that the time critical operations are handled before the indication to the user application.

◆ IOLM_SMI_ENABLED

#define IOLM_SMI_ENABLED   1

Enable SMI.

If this is set to 1, the Standardized Master Interface (SMI) is used. This layer is on top of the system and application layer and handles most of the stack functionality.

◆ IOLM_SYSTICK_INTERVAL_MS

#define IOLM_SYSTICK_INTERVAL_MS   1

Interval of the SysTick timer in milliseconds.

The SysTick is used for the internal software timers. The function IOLM_Port_s32SysTickVal() requests a timer value. This parameter defines the tick increments of the timer. it should be between 1ms and 10ms.

◆ IOLM_WAKE_RETRY_TIMEOUT

#define IOLM_WAKE_RETRY_TIMEOUT   40

Retry interval of wake-up sequence.

See 7.3.2.2 of IO-Link Specification v1.1.2.

◆ IOLM_WAKEUP_PULSE_TIMER_US

#define IOLM_WAKEUP_PULSE_TIMER_US   75

Wake-up pulse timer length in microseconds (pulse needs to be 75-85 us).

This value is used to generate the wake-up pulse by a timer. It does not include the additional hardware delays and maybe additional jitter because of other interrupts. It is recommended to use a hardware timer with output compare unit to generate this pulse if IOLM_Port_PL_eWakeUp() returns IOLM_eWakeupMode_Stack.