Development of SAE J1939 protocol stack based on NXP MPC5744P

Publisher:lxy64420245Latest update time:2023-10-03 Source: elecfansKeywords:NXP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Summary

This note mainly records the development and interface design of the SAE J1939 protocol stack based on NXP MPC5744P, based on the CAN driver design summarized previously.


Preparation

Prepare a project where the CAN driver can work properly.

Familiar with J1939 protocol documents and standards, especially J1939-21 and J1939-81.


CAN

NXP's MPC5744P controller local area network CAN has basically the same structure as the NXP Kinetis KV and other series of flexCAN we used before. MPC5744P supports CAN2.0B. CAN's high-level protocol, J1939, is an extended frame based on CAN2.0B, a 29-bit identifier, and supports single-frame and multi-frame transceiver communication. This design mainly implements the SAE J1939 data link layer and network management layer.


J1939 and CAN interface

Interface function

Based on the CAN driver made last time, it provides a sending function and a receiving processing function as an interface with the J1939 protocol stack to complete the implementation and application of all J1939 functions.

9e8ce072-14ca-11ec-8fb8-12bb97331649.png

The receiving interface is used to obtain the CAN message frame on the bus, which is then parsed by the J1939 processing function. This send function is not listed.


type of data

The following data types are specifically defined according to the standards and requirements of J1939 to facilitate program development and application.

9ecbb4aa-14ca-11ec-8fb8-12bb97331649.png

J1939 external interface

Except for initialization, the J1939 external interface has only one function. All functions are implemented in this function. Because there are many time bases inside the J1939 protocol stack, the design is based on 10ms, so this function is called in 10ms.

9ed59c86-14ca-11ec-8fb8-12bb97331649.png

9eeb29b6-14ca-11ec-8fb8-12bb97331649.png

test

The SAE J1939 protocol is a high-level protocol of CAN. It is widely used in heavy-duty vehicles, special vehicles, agricultural machinery, and non-road equipment vehicles.

The SAE J1939 protocol stack mainly refers to the standards J1939-21 data link layer and J1939-81 network management layer. For details of the standard, please refer to SAE's J1939 standard.

9f3e3d22-14ca-11ec-8fb8-12bb97331649.png


Keywords:NXP Reference address:Development of SAE J1939 protocol stack based on NXP MPC5744P

Previous article:CAN driver development and testing based on NXP MPC5744P
Next article:Development, compilation and configuration of MACL and EB based on MPC5744P

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号