lin_master#
Overview#
The LIN (Local Interconnect Network) demo application is a use-case of LIN low level driver without LIN stack. This application pair (master and slave) demonstrates a signal transfer between the two nodes. Master node and slave node signals are represented by the character array. Master node repeatedly initializes transfer by generating frame header, master and slave then exchange response as signal represented by the character array. This demo uses auto-baudrate feature. Both master and slave node must have implemented the timer that is used by timeout service routine every 500 us and master node use the same timer to check for switch of the frame table scheduler every 5 ms. The application and driver use the state machines to handle various of states of the bus on different levels.
Running the demo#
User can use the button 1 to set master node to sleep and button 2 to wakeup the master node which is indicated by LED state.
This application supports only unconditional frame types.
Master starts communication on button 2 press. First frame is sent from master to slave. Slave will update its frame buffer and continue to send its own frame. After that slave will repeate the response from master and master will send the new frame in the next turn. The next two frames are of diagnostic type and could be used for customer purposes (for example LIN cluster go to sleep command). This sequence is than repeated.
If communication is succesfull the master and slave node will both repeatedly print:
LIN DEMO SLAVE LIN DEMO MASTER
Supported Boards#
KW45B41Z-EVK
Overview
The LIN (Local Interconnect Network) demo application is built on Low Power UART. SW3 is used as button 1 to set master node to sleep and SW2 is used as button 2 to wakeup the master node.
Hardware requirements
Two micro USB cables
Two KW45B41Z-EVK boards
Personal Computer
Power adapter 12 V
Three Dupont female-to-female wires
Board settings
Connect J11-1 of the two boards
Connect J11-2 of the two boards
Connect J11-4 of the two boards
Connect 12 V adapter to J9
Short the JP19-1 and JP19-2 with the jumper
Prepare the Demo
Connect a mini/micro USB cable between the PC host and the OpenSDA USB port on the boards.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for master node to the target board.
KW47-EVK
Overview
The LIN (Local Interconnect Network) demo application is built on Low Power UART. SW3 is used as button 1 to set master node to sleep and SW2 is used as button 2 to wakeup the master node.
Hardware requirements
Two micro USB cables
Two KW47-EVK boards
Personal Computer
Power adapter 12 V
Three Dupont female-to-female wires
Board settings
Connect J11-1 of the two boards
Connect J11-2 of the two boards
Connect J11-4 of the two boards
Connect 12 V adapter to J9
Short the JP19-1 and JP19-2 with the jumper
Prepare the Demo
Connect a mini/micro USB cable between the PC host and the OpenSDA USB port on the boards.
Open a serial terminal on PC for OpenSDA serial device with these settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for master node to the target board.
FRDM-KW43
Overview
The LIN (Local Interconnect Network) demo application is built on Low Power UART. SW3 is used as button 1 to set master node to sleep and SW2 is used as button 2 to wakeup the master node.
Hardware requirements
Type-C USB cable
FRDM-KW43 Board
Personal Computer
Power adapter 12V
Three Dupont female-to-female wires
Board settings
Connect J18-1 of the two boards
Connect J18-2 of the two boards
Connect J18-4 of the two boards
Connect 12V adapter to J1
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
FRDM-MCXW70
Overview
The LIN (Local Interconnect Network) demo application is built on Low Power UART. SW3 is used as button 1 to set master node to sleep and SW2 is used as button 2 to wakeup the master node.
Hardware requirements
Type-C USB cable
FRDM-MCXW70 Board
Personal Computer
Power adapter 12V
Three Dupont female-to-female wires
Board settings
Connect J18-1 of the two boards
Connect J18-2 of the two boards
Connect J18-4 of the two boards
Connect 12V adapter to J1
Prepare the Demo
Connect a USB cable between the host PC and the FRDM board J28.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program to the target board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.