资源预览内容
第1页 / 共70页
第2页 / 共70页
第3页 / 共70页
第4页 / 共70页
第5页 / 共70页
第6页 / 共70页
第7页 / 共70页
第8页 / 共70页
第9页 / 共70页
第10页 / 共70页
亲,该文档总共70页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
密 级 桂林电子科技大学 硕硕 士士 学学 位位 论论 文文 题题目目 基于 STM32 和 CAN 总线的 J1939 协议的研究 (英文英文) Research of J1939 Protocol Based on STM32 and CAN Bus 研研 究究 生生 学学 号号: : 102081406 研研 究究 生生 姓姓 名名: : 许炳华 指导教师姓名指导教师姓名、职务职务: : 潘明 副教授 申申 请请 学学 位位 门门 类类: : 工学硕士 学科学科、专专 业业 名名 称称: : 控制理论与控制工程 提提 交交 论论 文文 日日 期期: : 2013 年 4 月 5 日 论论 文文 答答 辩辩 日日 期期: : 2013 年 6 月 16 日 独创性独创性(或创新性或创新性)声明声明 本人声明所呈交的论文是我个人在导师指导下进行的研究工作及取得的研究 成果。尽我所知,除了文中特别加以标注和致谢中所罗列的内容以外,论文中不 包含其他人已经发表或撰写过的研究成果;也不包含为获得桂林电子科技大学或 其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做 的任何贡献均已在论文中做了明确的说明并表示了谢意。 申请学位论文与资料若有不实之处,本人承担一切相关责任。 本人签名: 日期: 关于论文使用授权的说明关于论文使用授权的说明 本人完全了解桂林电子科技大学有关保留和使用学位论文的规定,即:研究 生在校攻读学位期间论文工作的知识产权单位属桂林电子科技大学。本人保证毕 业离校后,发表论文或使用论文工作成果时署名单位仍然为桂林电子科技大学。 学校有权保留送交论文的复印件,允许查阅和借阅论文;学校可以公布论文的全 部或部分内容,可以允许采用影印、缩印或其它复制手段保存论文。(保密的论 文在解密后遵守此规定) 本学位论文属于保密在_年解密后适用本授权书。 本人签名: 日期: 导师签名: 日期: 摘 要 I 摘 要 随着汽车工业的不断发展,基于 CAN 总线的汽车网络受到越来越多的汽车厂商 的关注。搭建汽车网络之后,汽车内部的 ECU 之间能够进行可靠、有序的通信,减 少了 ECU 之间的通信干扰和错误,大大提升了汽车的各项性能。J1939 协议是适用 于大型商用车辆的汽车网络通信标准,随着人们对商用车性能需求的不断增加,越来 越多的汽车电子厂商开始致力于 J1939 协议的研究。 本文在充分了解 J1939 协议在国内外发展与应用现状和归纳总结了 J1939 协议的 发展趋势后,对 J1939 协议进行了系统的研究。 首先,以内嵌 CAN 控制器的 STM32F103ZET6 芯片作为节点的处理器和 CAN 控制器,以 TJA1050 和 VP230 这两种高速 CAN 收发芯片作为节点的 CAN 收发器, 设计了发动机电子控制单元节点、变速器电子控制单元节点以及故障诊断/参数监测 节点的硬件电路。 其次,制作了 CAN 总线的连接板,将所设计的三个节点通过 CAN 总线连接在 一起,构建了一个模拟的 J1939 通信网络。编写各节点 CAN 接口的波特率和过滤器 的设置程序,实现了 J1939 协议规定的 250kbps 的通信速率和对扩展数据帧进行过滤 的过滤器要求。编写扩展数据帧通信测试程序及综合测试程序并借助 CAN 分析仪和 CANPro 软件,完成对 J1939 通信网络的测试。 再次,在 J1939 通信网络的基础上,根据 J1939 协议网络管理层的规定,对各节 点的 CA 进行命名,并按照不同节点 CA 的地址声明流程,编写各节点 CA 的地址声 明程序,实现了各个节点 CA 的地址声明,使发动机电子控制单元节点 CA 成功获得 地址 0X00, 变速器电子控制单元节点 CA 成功获得地址 0X03, 故障诊断/参数监测节 点 CA 成功获得地址 0XF9,实现了网络管理层的 CA 命名和地址声明管理功能。 最后,在 J1939 通信网络的基础上,按照 J1939 协议应用层对参数、参数组、诊 断消息 DM1 的定义,编写了故障诊断/参数监测节点的参数报文解析程序,实现该节 点对来自于其他节点的 PGN 65261、PGN 61444 等参数报文的准确解析;编写了故障 诊断/参数监测节点的故障解析程序,使该节点能够准确地解析出发动机油温过高、 发动机预过滤器油压过大等常见的发动机故障。 关键词关键词:CAN 总线;汽车网络;电子控制单元;J1939 协议;STM32 Abstract II Abstract With the fast development of the auto industry, more and more auto manufacturers pay more attention to vehicle network based on CAN bus. By constructing vehicle network, the ECUs can reliably and orderly communicate with others, reduce the communication interference and mistake. J1939 protocol is a communication standard which is applied to heavy commercial vehicle, more and more vehicle electronics manufacturers commit themselves to the research of J1939 protocol with the performance requirement of commercial vehicle. After fully acquainting the development and application at home and abroad of J1939 protocol and summarizing the trend of J1939 protocol , the subject do systematic research into J1939 protocol. Firstly, using the STM32F103ZET6 that embed CAN controller as peocessor and CAN controller, using TJA1050 and VP230 as CAN transceiver, the subject design the circuit of engine ECU, transmission ECU, fault diagnostic/parameter monitor node. Secondly, produce the CAN junction plate, and then construct a J1939 simulative communication network which consist of engine ECU, transmission ECU and fault diagnostic/parameter monitor node. Write relevant program to set the 250kbps Baud rate and filter of CAN interface, so that the Baud rate and extended frame filter can meet the requirement of J1939 protocol. Complete the function test of the J1939 communication network with the help of CANPro software of CAN analyzer and the program of comprehensive test and extended frame test. Once again, in the J1939 communication network, make the CA naming, in accordance with the flow of different nodes CA address claim, write the address claim program of nodes CA on the basis of the J1939 protocol management layer, then realize address claim of nodes CA. After the address claim, the engine ECU CA and transmission ECU CA successfully achieve address 0X00, 0X03, the fault diagnostic/parameter monitor node successfully achieve address 0XF9, realize nodes CA naming and address claim which is the two major function of J1939 protocol network management layer. Lastly, in the J1939 communication network, write parameter analytic program and fault analytic program apply to fault diagnostic/parameter monitor node according to the definition of parameter, parameter group and DM1 message which J1939 protocol application layer make. So that, the fault diagnostic/parameter monitor node can correctly Abstract III analyze the PGN 65261、PGN 61444 parameter messages from the other nodes and engine faults such as oil temperature of engine is too high and prefilter oil pressure too large and so on. Key Words:CAN bus; vehicle network; ECU; J1939 protocol; STM32 目录 IV 目录 摘 要 . I Abstract.
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号