| Contents | Index |
Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ C2803x
The Local Interconnect Network (LIN) bus implements a serial communications protocol for distributed automotive and industrial applications. In particular, LIN serves low cost applications that do not require the bandwidth or robustness provided by the CAN protocol. For more information about LIN, see http://www.lin-subbus.org/.
The LIN Receive block configures the target to receive scalar or vector data from the LINRX or LINTX pins.
Each C2803x target has one LIN module. Your model can only contain one LIN Transmit and one LIN Receive block per module.
The C2803x LIN Transmit block takes three inputs:
ID: Set the value of the LIN ID for the LIN transmit node.
Tx ID Mask: Set the value of the LIN ID mask for the LIN transmit node.
Data: Connect this input to the data source.
For more information and examples, see:
Note Many LIN-specific settings are located under Peripherals > LIN in the Target Preferences block for your model. Verify that these settings are correct for your application. |

Select the data type the LIN block outputs to the model. Available options are single, int8, uint8, int16, uint16, int32, or uint32. To interpret the data correctly, the data type and data length must match those of the data input to transmitting LIN node.
The default value is int16.
Set the length of the data the LIN block outputs to the model. This value is measured in multiples of the Data type. For example, if Data type is int16 and Data length is int16, the LIN block outputs the data to the model in lengths of
1 x int16
If you set the Data length to a value greater than 1, the block outputs the data as vectors.
To interpret the data correctly, the data type and data length must match those of the data input to transmitting LIN node.
The default value is 1.
Set the initial value the DATA port outputs to the model before the LIN node has received any data.
The default value is 0.
Specify what the LIN block outputs on the DATA port in response to a connection time-out. The choices are:
Output the last received value — the DATA port outputs the last data value the LIN node received.
Output custom value — the DATA port outputs the value defined by Output value when connection times out.
The default value is Output the last received value.
If the LIN node has not received data, and you set this parameter to Output the last received value, the DATA port outputs the Initial output value.
Specify the custom value the DATA port outputs when Action taken when connection times out is set to Output custom value and a connection timeout occurs.
If you enable (select) this checkbox, the target application stops and waits for the LIN node to receive data before continuing. If you disable this option, the application continues running and does not wait for data to arrive.
The default value is disabled (deselected).
If you enable (select) this option, the LIN node verifies the checksum it receives.
The default value is disabled (deselected).
Enabling (selecting) this checkbox adds a status output to the LIN Receive block, as shown in the following figure.
The status output reports the following values for each message the LIN node receives:
0: No error.
-1: A time-out occurred while the block was waiting to receive data.
-2: Unable to receive.
Other status values represent the highest 8 bits of the SCI Flags Register. Convert these values from decimal to binary. Then determine the meaning of these values by referring to "Table 14. SCI Flags Register (SCIFLR) Field Descriptions" in TMS320F2803x Piccolo Local Interconnect Network (LIN) Module, Literature Number SPRUGE2, available at the Texas Instruments Web site.
If you enable this option, the SCI node generates an interrupt after it receives a complete frame. The default value is Disabled.
If you enable this option, the LIN block generates an interrupt when the incoming message contains an invalid checksum.
The default value is Disabled.
The TXRX Error Detector Checksum Calculator verifies checksums for incoming messages. With the classic LIN implementation, the checksum only covers the data fields. For LIN 2.0–compliant messages, the checksum includes both the ID field and the data fields. If you enable this option, the Checksum Calculator generates interrupts when it detects checksum errors, such as those caused by LIN message collisions.
If you enable this option, the LIN module generates interrupts when framing errors occur.
The default value is Disabled.
If you enable this option, the LIN module generates interrupt when overrun errors occur.
The default value is Disabled.
If you enable this option, the LIN module generates an ID-Parity interrupt when it receives an invalid ID.
The default value is Disabled.
If you enable this option, also enable Parity mode in the Target Preferences block.
If you enable this option, the LIN module generates an interrupt when the LIN node validates the ID in messages it receives.
The default value is Disabled.
Set the block's input sample time, Ts.
The default value is 0.1 seconds.
For detailed information on the LIN module, see TMS320F2803x Piccolo Local Interconnect Network (LIN) Module, Literature Number SPRUGE2, available at the Texas Instruments Web site.
C2803x LIN Transmit (block reference)
LIN (block reference)
Configuring LIN Communications
LIN-Based Control of PWM Duty Cycle (demo)

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |