Specifications
2 LIN Bus 2.0 Reference Design
Contents
3.4 Source Code Files ...................................................................................................................18
3.5 Header Files ............................................................................................................................18
3.6 Creating a Project Using the Design IP ...................................................................................18
3.6.1 Importing the Design .............................................................................................18
3.6.2 Configuring Global Resources...............................................................................19
3.6.3 Configuring GPIO ..................................................................................................19
3.6.4 Routing the Signals ...............................................................................................19
3.6.5 Setting the Baud Rate ...........................................................................................20
3.6.6 Adding the Schedule Timer ...................................................................................20
3.6.7 Setting the Source Clock and Period ....................................................................20
3.6.8 Configuring the Signal Table..................................................................................20
3.6.9 RAM Allocation ......................................................................................................20
3.6.10 Frame Definition ....................................................................................................20
3.6.11 Schedule Table ......................................................................................................22
3.6.11.1 Structure of Schedule Table................................................................22
3.6.11.2 An Example Schedule Table ...............................................................22
3.6.11.3 Diagnostic Schedules..........................................................................23
3.6.12 Adding the Main Application ..................................................................................23
3.6.13 Special Features....................................................................................................23
3.6.13.1 Low Power Management.....................................................................23
3.6.13.2 Node Configuration..............................................................................24
3.6.13.3 Implementation of Sporadic Frames....................................................24
3.7 Master Design APIs .................................................................................................................25
3.7.1 Basic Functions .....................................................................................................25
3.7.2 Miscellaneous Core API Functions........................................................................26
3.7.3 LIN Node Configuration API Functions..................................................................27
3.8 Time Study...............................................................................................................................28
3.8.1 ISR Timing.............................................................................................................28
3.8.2 Calculation of CPU Overhead Over a Frame ........................................................29
3.8.3 Maximum Interrupt Latency ...................................................................................29
4.1 Slave Software Architecture..............................................................................................................31
4.1.1 Overview................................................................................................................31
4.1.2 Foreground Processing .........................................................................................31
4.1.3 Timing and Interrupts.............................................................................................31
4.2 Device Configuration ...............................................................................................................32
4.2.1 Synchro Reception Configuration..........................................................................32
4.2.2 Data Reception Configuration................................................................................32
4.3 Firmware..................................................................................................................................32
4.3.1 Overview................................................................................................................32
4.3.2 GPIO Interrupt .......................................................................................................32
4.3.3 Synchro Timer Interrupt.........................................................................................33
4.3.4 Synchro Timeout Interrupt .....................................................................................33
4.3.5 RX Interrupt ...........................................................................................................33
4.3.6 TX Interrupt............................................................................................................34
4.3.7 Bit Timer Interrupt.................................................................................................34
4.4 LIN Source Code Files.............................................................................................................34
4.5 Header Files ............................................................................................................................34
4.6 Using the Design IP .................................................................................................................35
4.6.1 Importing the Design .............................................................................................35
4.6.2 Configuring Global Resources...............................................................................35
4.6.3 Configuring GPIO ..................................................................................................35
4.6.4 Routing the Signals ...............................................................................................36
4.6.5 Configuring the Signal Table..................................................................................36