UDS之AM、BS、STmin、FF、FC、CF介绍

一、AM(寻址方式)

1、AM(Addressing Mode):寻址方式

在发送诊断指令的过程中,存在两种寻址方式:物理寻址和功能寻址

物理寻址:即该诊断服务请求只针对符合请求中物理地址的ECU,其他ECU节点不做任何接收处理;
功能寻址:即该诊断物理请求针对当前网络下所有的ECU节点,所有的ECU均会接收处理该诊断请求;
通俗得说,物理寻址是一对一的,在人群中你要找人,直接喊他的名字,即为物理寻址;功能寻址为一对多,在人群中你要找所有男性,即为功能寻址;

2、应用场景与作用

当该诊断请求需要发送至特定ECU节点时,就需要使用物理寻址方式,如使用$2E服务写DID或者执行$34,$36, $37执行下载程序时;
当该诊断请求需要发送至当前网络下所有的ECU节点时,就需要使用功能寻址,典型过程如FBL刷写过程中的$28,$85服务等

二、BS(块大小)

1、BS(Block Size ):块大小

BS:接收方表示发送流控帧之后,发送方被允许连续发送的最大帧数目。特殊情况下,如果该值为0,则表示发送连续帧没有限制,如果值为8,表示发送方最多能连续发送8帧CF就会继续收到接收方的流控帧;

三、STmin(separation time min)

接收方发送流控帧之后,发送方发送的连续帧之间的时间最小间隔。如果值为0,表示对于发送方发送CF的最小时间没有要求

四、FF、FC、CF

首帧FF(First Frame ):发送多帧过程中的首帧报文;
流控帧FC(Flow Control):发送方发送首帧报文之后,如果有流控,接收方回复的流控帧;
连续帧CF(Consecutive Frame):流控帧之后发送方能够连续发送的报文帧;
三者关系如下图:

在这里插入图片描述

详细报文举例:

 发送单帧 03 22 FD FC 00 00 00 00——  [^1]: 03中的0是是单帧的标志
 回复首帧 10 16 62 FD FC 01 02 03——  [^2]: 10中的1是是首帧的标志, 
                                          16表示字节长度为22
 流控帧  30 02 14 00 00  00 00 00 — [^3]: 30中的3是是流控帧的标志,0为流的状态;
                                          0是继续发送,1是等待,2是溢出
                                         02为块的大小(BS),一次性连续发送连续帧最大2帧,
                                          14表示STmin为20ms
  连续帧 [21] 04  05 06  07 08  09 0A——  [^4]: 30中的3是是流控帧的标志 
                                              [21]、[22]、 [23]中的2是连续帧标志
        [22] 0B 0C 0D 0E 0F 10 11
 流控帧   30 02 14 00 00 00 00 00
 连续帧   [23] 12 13 00 00 00 00 00
### UDS Diagnostic STMin Parameter Configuration and Troubleshooting In the context of automotive communication protocols, particularly within Unified Diagnostic Services (UDS), configuring and troubleshooting the `STMin` parameter is crucial for ensuring efficient data transmission between Electronic Control Units (ECUs). The `STMin` parameter specifies the minimum separation time that should elapse before sending each frame during a multi-frame message transfer. The configuration interface provided by BUSMASTER allows direct modification of parameters such as `Stmin`, which directly influences how quickly subsequent frames are sent after an initial request or response has been initiated[^3]. This setting ensures that ECUs have sufficient processing time without causing network congestion due to overly rapid transmissions. When encountering issues related to `STMin`, common problems may include: - **Timing Errors**: If `STMin` values are set too low, it might lead to timing errors where receiving nodes cannot process incoming messages fast enough. - **Network Congestion**: Setting this value improperly can result in excessive traffic on the bus, leading to potential delays or loss of critical information packets. To address these concerns effectively, one approach involves adjusting both local settings through tools like BUSMASTER's Diagnostics Settings menu while also considering any constraints imposed by specific implementations outlined under standardized service APIs for High Performance Computing (HPC) diagnostics[^1]. For instance, when dealing with server configurations involving control types affecting communication methods, understanding how changes propagate across systems becomes essential. Specifically, modifying certain aspects could necessitate corresponding adjustments elsewhere to maintain optimal performance levels[^2]. ```python def configure_stmin(ecu_settings, desired_stmin_value): """ Configures the STMin parameter for ECU communications Args: ecu_settings (dict): Current ECU settings dictionary desired_stmin_value (int): Desired STMin value in milliseconds Returns: dict: Updated ECU settings including new STMin value """ updated_settings = ecu_settings.copy() updated_settings['stmin'] = desired_stmin_value return updated_settings ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值