Main Content

C28x-LIN

You can configure the LIN Transmit and LIN Receive blocks within a model.

For detailed information on LIN module, see TMS320F2803x Piccolo Local Interconnect Network (LIN) Module, Literature Number SPRUGE2, available at the Texas Instruments® website.

LIN Module clock frequency (LM_CLK = SYSCLKOUT/2) in MHz

Display the frequency of the LIN module clock in MHz.

Enable loopback

Enables LIN loopback testing. When this option is enabled, the LIN module does the following:

  • Internally redirects the LINTX output to the LINRX input.

  • Places the external LINTX pin in a high state.

  • Places the external LINRX pin in a high impedance state.

The default is disabled.

Suspension mode

Use this option to configure how the LIN state machine behaves while you debug the program on an emulator. The available options are:

  • Hard_abort—Halts the transmissions and counters when you enter the LIN debug mode. The transmissions and counters resume when you exit LIN debug mode.

  • Free_run—Allows completion of the current transmit and receive functions when you enter the LIN debug mode.

Parity mode

Use this option to configure parity checking. The available options are:

  • None—Disables parity.

  • Odd—Sets the parity bit to one if you have an odd number of ones in your bytes, such as 00110010.

  • Even—Sets the parity bit to one if you have an even number of ones in your bytes, such as 00110011.

The default is None.

For ID parity error interrupt in the LIN Receive block to generate interrupts, enable Parity mode.

Frame length bytes

Set the number of data bytes in the response field, from 1–8 bytes.

The default is 8 bytes.

Baud rate prescaler (P: 0-16777215)

To set the LIN baud rate manually, enter a prescaler value, from 0–16777215. Click Apply to update the Baud rate display.

The default is 15.

For more information, see the “Baud Rate” topic in the Texas Instruments document, TMS320F2803x Piccolo Local Interconnect Network (LIN) Module, Literature Number SPRUGE2.

Baud rate fractional divider (M: 0–15)

To set the LIN baud rate manually, enter a fractional divider value, from 0–15. Click Apply to update the Baud rate display.

The default is 4.

For more information, see the “Baud Rate” topic in the Texas Instruments document, TMS320F2803x Piccolo Local Interconnect Network (LIN) Module, Literature Number SPRUGE2.

Baud rate (FLINCLK = LM_CLK/(16*(P+1+M/16)) in bits/sec

Display the baud rate. For more information, see “Setting the LIN baud rate”.

Communication mode

Enable or disable the LIN module from using the ID-field bits ID4 and ID5 for length control.

The default is ID4 and ID5 not used for length control.

Data byte order

Set the “endianness” of the LIN message data bytes.

The default is Little_Endian.

Data swap width

Set the width for data swap. If you set Data byte order to Big_Endian, the only available option for Data swap width is 8_bits.

Pin assignment (Tx)

Map the LINTX output to a specific GPIO pin.

The default is GPIO9.

Pin assignment (Rx)

Map the LINRX input to a specific GPIO pin.

The default is GPIO11.

LIN mode

Set the LIN module as a controller or a peripheral. The default is peripheral.

In controller mode, the LIN node can transmit queries and commands to peripherals. In peripheral mode, the LIN module responds to queries or commands from a controller.

This option corresponds to the CLK_controller field in the SCI Global Control Register (SCIGCR1).

ID filtering

Select the type of mask filtering comparison the LIN module performs.

If you select ID byte, the module uses the RECID and ID-BYTE fields in the LINID register to detect a match. If you select this option and enter 0xFF for LINMASK, the LIN module does not report matches.

If you select ID peripheral task, the module uses the RECID an ID-peripheralTask byte to detect a match. If you select this option and enter 0xFF for LINMASK, the LIN module reports matches.

The default is ID peripheral task byte.

ID byte

If you set ID filtering as ID byte, use this option to set the ID BYTE, also known as the “LIN mode message ID”.

In controller mode, the CPU writes this value to initiate a header transmission. In peripheral mode, the LIN module uses this value to perform message filtering.

The default is 0x3A.

ID peripheral task byte

If you set ID filtering to ID peripheral task byte, use this option to set the ID-peripheralTask BYTE. The LIN node compares this byte with the received ID and determines whether to transmit or receive.

The default is 0x30.

Checksum type

If you select Classic, the LIN node generates the checksum field from the data fields in the response.

If you select Enhance, the LIN node generates the checksum field from both the ID field in the header and data fields in the response. LIN 1.3 supports classic checksums only. LIN 2.0 supports both classic and enhanced checksums.

The default is Classic.

Enable multibuffer mode

When you select this check box, the LIN node uses transmit and receive buffers instead of just one register. This setting affects various other LIN registers, such as: checksums, framing errors, transmitter empty flags, receiver ready flags, and transmitter ready flags.

The default is selected.

Enable baud rate adapt mode

This option is displayed when you set LIN mode to peripheral.

If you enable this option, the peripheral node automatically adjusts its baud rate to match that of the controller node. For this feature to work, first set the Baud rate prescaler and Baud rate fractional divider.

If you disable this option, the LIN module sets a static baud rate based on the Baud rate prescaler and Baud rate fractional divider.

The default is not selected.

Inconsistent synch field error interrupt

This option is displayed when you set LIN mode to peripheral.

If you enable this option, the peripheral node generates interrupts when it detects irregularities in the synch field. This option is only relevant if you enable Enable adapt mode.

The default is Disabled.

No response error interrupt

This option is displayed when you set LIN mode to peripheral.

If you enable this option, the LIN module generates an interrupt if it does not receive a complete response from the controller node within a timeout period.

The default is Disabled.

Timeout after 3 wakeup signals interrupt

This option is displayed when you set LIN mode to peripheral.

When enabled, the peripheral node generates an interrupt when it sends three wakeup signals to the controller node and does not receive a header in response. The peripheral waits 1.5 seconds before sending another series of wakeup signals.

This interrupt indicates that the controller node is having a problem recovering from low-power or sleep mode.

The default is Disabled.

Timeout after wakeup signal interrupt

This option is displayed when you set LIN mode to peripheral.

When enabled, the peripheral node generates an interrupt when it sends a wakeup signal to the controller node and does not receive a header in response. The peripheral waits 150 milliseconds before sending another series of wakeup signals.

This interrupt indicates that the controller node is delayed recovering from low-power or sleep mode.

The default is Disabled.

Timeout interrupt

This option is displayed when you set LIN mode to peripheral.

When enabled, the peripheral node generates an interrupt after 4 seconds of inactivity on the LIN bus.

The default is Disabled.

Wakeup interrupt

This option is displayed when you set LIN mode to peripheral.

When you enable this option:

  • In low-power mode, a LIN peripheral node generates a wakeup interrupt when it detects the falling edge of a wake-up pulse or a low level on the LINRX pin.

  • A LIN peripheral node that is “awake” generates a wakeup interrupt if it receives a request to enter low-power mode while it receives data.

  • A LIN peripheral node that is “awake” does not generate a wakeup interrupt if it receives a wakeup pulse.

The default is Disabled.

Related Topics