• 沒有找到結果。

LIN Bus – A Cost-Effective Alternative to CANLIN Bus – A Cost-Effective Alternative to CAN

N/A
N/A
Protected

Academic year: 2022

Share "LIN Bus – A Cost-Effective Alternative to CANLIN Bus – A Cost-Effective Alternative to CAN"

Copied!
4
0
0

加載中.... (立即查看全文)

全文

(1)

by Karen Parnell

Automotive Product Marketing Manager Xilinx, Inc.

[email protected]

The automotive industry is constantly striv- ing to reduce costs but at the same time introduce new and innovative comfort and convenience features to meet customer demand. Almost all automotive companies have adopted various busing systems to reduce wiring complexity and weight, and hence overall costs. This also results in increased fuel efficiency.

Although flexible topologies are ideal, the need exists for global standards to offer better business cases to suppliers, which would ultimately lead to greater competi- tion and lower prices. J1850 (in the U.S.) and the ubiquitous Bosch™-defined Controller Area Network (CAN) (in Europe) are the most popular standards to date, but in some applications can be con- sidered overkill.

In such applications you could consider using LIN as an alternative. The Local Interconnect Network (LIN) is a single- wire UART-based networking architecture originally developed for automotive sensor and actuator networking applications. The LIN master node connects the LIN net- work to higher-level networks like CAN, extending the benefits of networking all the way to the individual sensors and actuators.

LIN Bus – A Cost-Effective Alternative to CAN

LIN Bus – A Cost-Effective Alternative to CAN

00 Xcell Journal Winter 2004

PLDs are ideal for implementing

LIN buses, offering fast time

to market, flexible design

options, low cost, and low

power consumption.

(2)

In addition to CAN, LIN also comple- ments Media Oriented Systems Transport (MOST) for high-speed data rates and FlexRay for safety-critical applications such as steer- and brake-by-wire. Figure 1 shows the relative cost per node and speed of var- ious automotive networks.

Conceived in 1998, the LIN consortium comprises car manufacturers Audi™, BMW™, DaimlerChrysler™, Volvo™, and Volkswagen™. LIN is an inexpensive serial bus used for distributed body control electronic systems in vehicles. It enables effective communication for smart sensors and actuators where the bandwidth and ver- satility of CAN is not required. Typical applications are door control (window lift, lock, and mirror control), seats, climate reg- ulation, lighting, and rain sensors. In these units the cost-sensitive nature of LIN enables the introduction of mechatronic ele- ments such as smart sensors, actuators, or illumination. They can be easily connected to the car network and become accessible to all types of diagnostics and services. Outside the automotive sector, LIN is used for machine control as a sub-bus for CAN.

A LIN network comprises one master node and one or more slave nodes. All nodes include a slave communication task that is split into a transmit and a receive task, while the master node includes an additional master transmit task. The com- munication in an active LIN network is always initiated by the master task: the master sends out a message header that comprises the synchronization break, syn- chronization byte, and message identifier.

Exactly one slave task is activated upon reception and filtering of the identifier, which starts the transmission of the mes- sage response. The response comprises two, four, or eight data bytes and one checksum byte. The header and the response part form one message frame.

The identifier of a message denotes the content of a message but not the destina-

have developed robust and fully verified IP cores aimed at FPGA and CPLD architec- tures. One example is their LIN core, which occupies a fraction of a low-cost FPGA (for example, 13% of a 200,000 system-gate device), thus leaving space for additional LIN nodes, CAN nodes, UARTs, soft core processors, or simply glue logic.

The LIN interface – whether imple- mented in programmable logic, ASIC, or ASSP – is approximately half the cost of a CAN node.

LIN Bus Benefits

The reliability of LIN is high, but it does not have to meet the same levels as CAN.

A LIN bus is designed to be a logical extension to CAN. It is scalable and low- ers the cost of satellite nodes. No crystal oscillator or resonator is required. It is easy to implement, has a low reaction time (100 ms max), and predictable worst-case timing.

The LIN bus can be implemented using just a single wire, while CAN needs two wires. This means that a LIN network can also be lower in cost through simpler con- nectors and wiring – thus also reducing the tion. This communication concept enables

the exchange of data in various ways: from the master node (using its slave task) to one or more slave nodes, and from one slave node to the master node and/or other slave nodes. It is possible to communicate signals directly from slave to slave without the need for routing through the master node, or

broadcasting messages from the master to all nodes in a network. The sequence of message frames is controlled by the master and may form cycles including branches.

Flexible LIN Solution

Programmable logic has long been accept- ed as an effective way to bring designs to market quickly and also allow design flexi- bility right up to production and beyond.

Historically, this time-to-market advantage and flexibility had to be balanced with higher component costs.

But times have changed. PLDs cost much less and can now be used in high- volume, cost-sensitive applications such as mobile phones, PDAs, and automotive info- tainment systems. To enable designs to be brought to market quickly, some Xilinx AllianceCORE™ third-party IP providers

Winter 2004 Xcell Journal 00

25M 10M 1M 125K 20K

1 2 5 10

SMARTwireX Copper Twisted Pair

FlexRay, TTx Time Triggered (TDMA)

Fault Tolerant 2 x 2 Wire Optical

Bluetooth Wireless Bus CAN-A

Arbitration (CSMA) Dual Wire CAN-B Arbitration Fault Tol. Dual Wire Time TriggeredLIN

Master/Slave Single Wire, No Crystal

J1850

ByteFlight

D2B, MOST Token Ring Optical Bus

Figure 1 – Relative cost per node of automotive networks

Programmable logic has long been accepted as an effective way to bring

designs to market quickly and also allow design flexibility...

(3)

weight of wiring, increasing fuel efficiency, and reducing handling time and manufac- turing costs. CAN also needs a 5V supply for the bus, whereas LIN only requires 2V.

Table 1 shows the relative merits of LIN versus CAN.

In summary, LIN offers these benefits:

• Complementary to CAN as an ultra- low-cost sub-network

• Self-synchronization mechanism means no quartz oscillator required

• Low-cost silicon implementation using on-chip UART or SCI

• Single wire + low baud rate = reduced harness cost

• No protocol license fee

Microcontroller Implementation

There are many ways to implement LIN in semiconductors:

• Software: bit bashing

• Software: UART implementation

• Hardware: MCU with dedicated LIN port

• Hardware: PLD

Let’s look at each way and explore the benefits and pitfalls of each.

Software: Bit Bashing

A LIN node can be implemented in many microcontrollers (MCUs) with no addi- tional hardware except for a physical layer driver device. It can be implemented using existing on-chip MCU resources such as timers, GPIO, and interrupts – effectively

“bit bashing.”

This type of implementation does have restrictions – designers must adhere to

strict real-time programming constraints to meet the full LIN specification. This is expensive with respect to MCU timing and on-chip resources and leaves very little bandwidth for other application code.

LIN nodes based purely on “bit bash- ing” may also be complicated to test, par- ticularly when integrated with existing RTOSs. With this type of implementation, it would be very difficult to achieve accu- rate bit timing measurement and control and may not be power efficient or practical.

Software: UART Implementation LIN was originally conceived to make use of existing UARTs within standard MCUs, along with on-chip timers, GPIO, inter- rupts, and serial ports. This is a better way

of implementing than simply “bit bashing”

but may have certain limitations in designs that already use the on-chip serial port for other tasks.

This implementation may also burden the application code with LIN protocol requirements and will complicate the design and testability of the code. This method also needs to be complemented with GPIO functionality for error check- ing and synchronization purposes and requires CPU activity throughout LIN message exchange. Therefore, it is not the most power-efficient solution.

Hardware: MCU with Dedicated LIN Port

An MCU with dedicated LIN port may appeal to more designers, as it uses off- the-shelf verified silicon. Thus, it will not burden the software application with LIN protocol processing, as shown in the pre- vious examples. This type of micro is well suited for CAN-to-LIN bus bridging applications where a need exists to pass data between the two networks. This implementation also tends to be less power hungry than the equivalent soft- ware solution.

As with most emerging networks, however, the availability of silicon and relatively high cost may be an issue and create long lead times – so forward plan- ning is a must with respect to ordering devices. One of the potential downfalls of using these devices is when more than one LIN is needed. For example, in an ECU gateway, you may need to use more than one MCU – which will impact part costs, manufacturing costs, stocking costs, and PCB complexity.

If your design requires something out- side of the specification provided by the silicon vendor, this may also cause issues,

as these fixed function parts allow little or no flexibility for customization. The devices still require an external bus trans- ceiver chip and a degree of real-time pro- cessing in the MCU.

Distributed MCU solutions can also result in complex design and test issues associated with software-based designs;

designers may need to explore all potential fault and interrupt loop states so that no strange indeterminate states occur.

Exhaustive testing is costly, however, and the test vectors can take longer to write than the design code itself.

00 Xcell Journal Winter 2004

Automotive

Speed Cost

Requirements Size in Programmable Logic

Network Per Node

CAN Up to 1 Mbps $2 Crystal oscillator,

348 slices (FPGA) two wires, 5V bus supply

LIN 20 Kbps $1 Single wire 256 slices (FPGA)

40M line length or 216 macrocells (CPLD)

Table 1 – CAN versus LIN

A LIN node can be implemented in many micro- controllers (MCUs) with no additional hardware

except for a physical layer driver device.

(4)

Hardware: Programmable Logic Device (PLD)

LIN implemented in PLDs offers similar benefits to LIN implemented in an MCU- dedicated hardware peripheral. They do benefit from being implemented in generic devices that are off-the-shelf, low cost, and low power. This means that time to market is extremely quick and easy.

The LIN implemented in PLD hard- ware does not suffer from complicated test issues, as testing is much simpler and deter- minant than software-based designs. PLD LIN does not burden the software applica- tion with LIN protocol processing. It allows for accurate LIN timing control and does not require a crystal oscillator in slave mode, thus saving costs, board space, and power consumption.

PLDs are generic devices. They do not incur non-recurring engineering charges and can be used across many projects. One of the key advantages is the ability of the devices to be programmed in-system, so changing the hardware from master to slave is a breeze. As with MCU designs, the PLD needs an external transceiver device to drive the line.

The main downside to using PLDs?

You may not be conversant with the design flow, so this may not be your most natural design route – but it is certainly worth trying. In more integrated higher end designs you will still need some sort of processor support, but this can be achieved by using an embedded soft-core processor such as MicroBlaze™, a low- cost 32-bit RISC processor.

LIN System Development

Automotive designers have a dilemma when adopting a new bus standard: Should they wait for standard silicon devices or try to develop an ASIC with a semiconductor supplier in advance of a final agreed and verified protocol specification? Some speci- fications take years to be agreed upon, ver- ified, and ratified, so many semiconductor

suppliers are loath to start designing devices before the specification is frozen.

To take advantage of new busing net- works in advance of fixed specifications, designers are turning to soft IP cores embedded within programmable logic devices. This allows designers to try out new ideas risk-free and add in customized solutions within the bounds of the proto- col. This approach also allows cut-down versions of the full interface if not all of the features are required – thus saving even more silicon area.

Now that programmable logic prices have dramatically dropped, they can even be considered a viable way of designing production solutions as well as prototype builds. A key benefit of having a LIN inter- face embedded within a PLD in the form of an IP core is that it can be reconfigured remotely to be either a master or a slave node, thus aiding greatly the test and design phases. Even in field fault diagnosis and vehicle maintenance, the ability to make nodes either master or slave may be beneficial. In the case of a non-volatile CPLD, reconfiguring the node is simply a matter of erasing the device and re- programming it with a new personality.

The ability to switch between master and slave in the same device means that inventory and stocking costs are reduced – plus there is only the need to qualify one device rather than two, thus saving the lengthy device qualification time and costs associated with it.

PLDs from Xilinx are offered in the extended temperature range of -40°C to +125°C for automotive applications. PLDs come in two main types: the larger FPGAs and simpler, low-power CPLDs.

Conclusion

The LIN bus can be used as a cost-effective alternative to CAN in low-speed automo- tive and industrial networks. To add even more flexibility to the network, the LIN interface can be implemented in reconfig-

urable logic, which is not only low power but can be reconfigured remotely to be either a master or slave in the device.

The ability to reconfigure the device to either node can help with fault diagnosis in the field, test in development, and also cut down on inventory by only stocking one device. This also reduces device qualifica- tion time and costs.

For more information, visit these web- sites: CAN – www.can.bosch.com; LIN – www.lin-subbus.org; LIN IP core – www.intelliga.co.uk; Xilinx automotive devices – www.xilinx.com/automotive/.

Winter 2004 Xcell Journal 00

LIN IP Cores and LIN Application Note

Xilinx currently has two AllianceCore partners that offer fully verified LIN IP cores:

Intelliga Integrated Design Ltd.

and CAST™ Inc. Further details of these IP cores can be found at www.xilinx.com/ipcenter/.

You can download Xilinx application note XAPP432,

“Implementing a LIN Controller on a CoolRunner-II CPLD,” to use in an existing CoolRunner-II design, or simply to understand how to design your own LIN net- work. The application note is available at www.xilinx.com.

For more information, please e-mail the automotive team at [email protected].

Note: The LIN IP Core from Intelliga Integrated Design Ltd. and CAST Inc.

are fully supported for use in automo- tive designs.

The LIN implementation in XAPP432 is a reference design and should be used for evaluation purposes only.

The ability to switch between master and slave in the same device

means that inventory and stocking costs are reduced ...

參考文獻

相關文件

• The memory storage unit holds instructions and data for a running program.. • A bus is a group of wires that transfer data from one part to another (data,

optimum value of the radius R to be rmin = 18.59 feet, and the corresponding cost is costmin = $5140. So near the optimum radius, the cost is rather insensitive to changes in

Find

With the help of the pictures and the words below, write a journal entry about what happened.. Write at least

 Promote project learning, mathematical modeling, and problem-based learning to strengthen the ability to integrate and apply knowledge and skills, and make. calculated

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

作業必須包括完整電路圖及說明,PROBE 的圖也必須加以說明,包括題號、橫軸、縱軸、每條 曲線的意義,並對結果加以討論。切忌抄襲,題目中有防止抄襲裝置。請勿只交 PSPICE