herunterladen
Freescale Semiconductor
Application Note
Document Number: AN3333
Rev. 0, 11/2006
Contents
© Freescale Semiconductor, Inc., 2006. All rights reserved.
1 Introduction
The XGATE signal gateway package is a collection of
header and source files in the C programming language,
enabling you to create a CAN and LIN signal level
automotive body gateway. The gateway structure
detailed in this application note is flexible enough to
allow extensions and/or modifications to satisfy a
particular environment’s requirements.
2 Signal Gateway Theory
No industry-wide standard currently exists for
automotive body gateways. Each vehicle manufacturer
maintains his or her own set of evolving specifications of
the traffic a gateway handles. This section outlines one
set of specifications. These specifications are not based
on requirements set by any specific vehicle
manufacturer. To gain insight into the XGATE
performance, this set represents meaningful basic body
gateway requirements enabling a real-world gateway to
be implemented.
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Signal Gateway Theory . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1 The Purpose of Gateways . . . . . . . . . . . . . . . . . . . . 2
2.2 Data Representation . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Gateway Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Gateway Implementation. . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Limitations of This Gateway Implementation. . . . . 23
4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1 XGATE Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Required Memory Size . . . . . . . . . . . . . . . . . . . . . 32
5 Generating the Descriptors . . . . . . . . . . . . . . . . . . . . . . 34
5.1 Generated Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.2 Node Data Worksheet . . . . . . . . . . . . . . . . . . . . . . 35
5.3 Rx Frames Worksheet. . . . . . . . . . . . . . . . . . . . . . 35
5.4 Tx Frame Worksheet. . . . . . . . . . . . . . . . . . . . . . . 37
5.5 Generating the Source Files . . . . . . . . . . . . . . . . . 38
6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
XGATE Library: Signal Gateway
Implementing CAN and LIN Signal Level Gateway
by: Daniel Malik
MCD Applications
East Kilbride, Scotland