LIN2.1 Protocol Application of Windows Control System

Source: Internet
Author: User
Welcome to the IT technology community forum, and interact with 2 million technical staff to enter the request frame of the master node. In D1, the request frame number of the first frame to be allocated in the number of frames is given. Generally, the IDS of all frames used by the slave node are arranged into a number of frames. If you want to assign a frame ID, a new frame ID is given through D2 to D5. If you want to disable a frame

Welcome to the IT technology community forum and interact with 2 million technical staff> request frames entering the master node provide the serial number of the first frame in the number of frames in the D1 that requires the allocation of the frame ID. Generally, the IDS of all frames used by the slave node are arranged into a number of frames. If you want to assign a frame ID, a new frame ID is given through D2 to D5. If you want to disable a frame

Welcome to the IT Community Forum and interact with 2 million technicians>



In D1, the request frame of the master node gives the sequence number of the first frame in the number of frames that need to assign the frame ID. Generally, the IDS of all frames used by the slave node are arranged into a number of frames. If you want to assign a frame ID, a new frame ID is given through D2 to D5. If you want to disable a frame, set the PID of the frame to 0x00; if you want to continue using the current frame ID, set the PID of the frame to 0xFF. (5) read the node information from the node according to the value of the ID in D1, different slave node information can be read. Currently, only the cases where ID is 0 and ID is 1 are specified. Others can be retained or determined by the user.

3 LIN communication implementation

3.1 TLE9832 LIN Module

TLE9832 is an 8-bit power-level single-chip microcomputer manufactured by infineon. It is specially used for window control. The LIN bus module supports LIN2.1 and LIN2.0, and is backward compatible with LIN 1. 3. This module can work in common, receive, and disable modes. The features of each mode are shown in table 1.



The normal mode can be divided into low-speed mode, medium-speed mode, high-speed mode, and Flash mode based on the transmission rate. The maximum transmission rate in low-speed mode is 10.4 kbps. In medium-speed mode, the normal LIN transmission mode has a maximum transmission rate of 20 kbps. In high-speed mode, the maximum transmission rate is 40 kbps; the maximum transmission rate in Flash mode is 11 5 khps. to avoid interrupting the transmission process, the transmission rate cannot be changed in normal mode. The correct method is to disable the sending function first, then change the transmission rate, and finally allow the sending function.

The LIN module also sets up an automatic power-saving mechanism in normal mode. When no data exists in the sending queue, the sending function is automatically disabled. When a request is sent, the sending function is automatically enabled.

3.2 TLE9832-based window clip Control System

The anti-Pinch window control system of Keding TLE9832 is the latest research achievement of infinitus-Tongji microcontroller and Embedded System Laboratory. You can use buttons or LIN bus to control the rise and fall of windows. The principle of the window Defense System Based on TLE9832 is shown in. The motor speed can be controlled by controlling the PWM signal, while the Hall sensor TLE4966 collects the motor speed and sends it to TLE9832, which constitutes a closed loop control. In addition, the motor's armature current is transferred to the TLE9832 ADC module after being converted to a voltage signal. If the window encounters abnormal resistance during the Rising process, the armature current and motor speed will change abnormally. Based on this change, TLE9832 can determine whether to execute the anti-clamping algorithm to avoid hurting passengers.



3.3 LIN Communication Software Design

The program process of LIN communication is shown in step 5. The program of LIN communication in the window controller can be divided into two parts: ① the first part is initialization. After each power-on, the program will first read the data in Flash, if the data in 0x8000 is 0x78, the configuration is saved after the product is released. Therefore, the program will read the SAVE and frame ID stored in Flash as the current one. next, initialize the LIN module, including setting timer and UART related to LIN communication, and setting parameters and baud rates of slave nodes.



② The second part is placed in the timer interrupt, where node configuration and data transmission and receiving are performed during each interruption. First, determine whether there are node configuration tasks based on the frame ID. If yes, execute various node configuration tasks based on the SID. Then, control the automatic rise and fall of Windows based on the received data frame content; finally, the window information, including the armature current and window location, is sent to the master node.

4 Test Results of LIN communication

This test is completed by using Lcaf Professional LIN, a lin communication testing tool developed by Kvaser, and CANLab. During testing, the test tool is set as the master node, the TLE9 832 microcontroller is set as the slave node, and the bit rate is set as 19200 bps. the initial content of the website is 0x06. The initial frame ID is 0x00, 0x01, and the diagnostic configuration frames are 0x3C and 0x3D. The Suppli erID and Function ID are both 0x0000. first, test the functions of the node configuration. First, test the function of allocating the website to the node and change the function of allocating the website to 0x03. Then, test the function of conditional distribution of the website to 0x08; then, test the function of allocating a series of frame IDs, save the settings, and then power on again, and read the slave node information. Test result 6 of the node configuration function is shown in.



Then, use the LIN bus to automatically increase and decrease the windows, as shown in test result 7.


Finally, we can use the LIN bus to obtain the armature current data during the window rising process and convert it into a graph, as shown in figure 8. The current value is the result after A/D conversion.



Conclusion

In this paper, the communication module of the window control system is designed based on the LIN2.1 protocol. It can be seen that this module can meet user needs in data transmission and diagnosis. The development of LIN bus will certainly promote the further development of the vehicle body control field.

[1] [2]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.