<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[can stack，uds stack配置功能寻址，功能寻址切换会话后，物理寻址读出来会话未切换]]></title><description><![CDATA[<p dir="auto">遇到的问题是通过功能寻址切换了02会话，但物理寻址读出来仍是01，调试发现，是按照channel索引。物理寻址和功能寻址不是一个channel<img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1553/e429a98c-46b8-4902-8cf7-cb01eeedc25b.png" alt="9b41d90d-5c00-4292-ad87-1b88fa5717e1-image.png" class=" img-fluid img-markdown" /> ，以下是我的配置截图，我想知道是配置问题，还是就需要手改<img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1553/496362f5-c17e-400a-b57f-2543628a53d9.png" alt="b3cc7671-a80d-48b5-8ea3-41b75f03e22c-image.png" class=" img-fluid img-markdown" /> <img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1553/d68173cb-ec90-48d9-8569-4c0ec88a9bed.png" alt="0cd61345-480a-4b35-9927-d8b79d8b616e-image.png" class=" img-fluid img-markdown" /> <img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1553/2b2d72ef-ad3c-409c-8d08-39a9d172eaca.png" alt="199b4c65-728a-4dcb-8f5b-dc0a68e9cd25-image.png" class=" img-fluid img-markdown" /> <img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1553/266d83bf-b310-4202-acab-8cddab9432c7.png" alt="618c4850-30f2-434c-84a9-c9daf100da7e-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.ytmicro.com/topic/2403/can-stack-uds-stack配置功能寻址-功能寻址切换会话后-物理寻址读出来会话未切换</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 18:15:14 GMT</lastBuildDate><atom:link href="https://forum.ytmicro.com/topic/2403.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Dec 2026 08:04:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to can stack，uds stack配置功能寻址，功能寻址切换会话后，物理寻址读出来会话未切换 on Tue, 01 Dec 2026 08:38:10 GMT]]></title><description><![CDATA[<p dir="auto">好的，我们参考试试，谢谢！</p>
]]></description><link>https://forum.ytmicro.com/post/10350</link><guid isPermaLink="true">https://forum.ytmicro.com/post/10350</guid><dc:creator><![CDATA[jesetec]]></dc:creator><pubDate>Tue, 01 Dec 2026 08:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to can stack，uds stack配置功能寻址，功能寻址切换会话后，物理寻址读出来会话未切换 on Tue, 01 Dec 2026 08:29:13 GMT]]></title><description><![CDATA[<p dir="auto">目前 UDS 代码还没有适配“一个 UDS 通道对接两个 CanStack 通道”的场景。配置界面中那样的设置，本意应该是新建两个 UDS 通道，而不是让一个 UDS 通道挂两个 CanStack 通道。<br />
如果希望一个 UDS 通道同时支持两个 CanStack 通道（例如一个用于功能寻址，另一个用于物理寻址），可以尝试按下面的方式修改：</p>
<ol>
<li>在 CanStack 侧建立两个通道，分别对应功能寻址和物理寻址。</li>
<li>修改 Uds_MainFunction() 中的 case UDS_RECEIVING: 分支，让它同时处理这两个 CanTp 通道，例如依次对两个 CanTp ID 调用 CanTp_CopyRxSdu()。</li>
<li>补充读取另一个 CanStack 通道的代码，避免只处理当前 channelId 对应的通道。<br />
另外，如果采用两个 CanStack 通道的方案，还需要去掉 UDS_IDLE 分支中的 break：<br />
case UDS_IDLE:<br />
让 UDS_IDLE 继续向下执行接收处理。原因在于：接收事件（Uds_CanTpRxIndicate → rxPending）是按 UDS 通道记录的单一事件，两个 CanTp 通道的事件会互相覆盖，或者在通道不处于 UDS_IDLE 时被丢弃；只有让 IDLE 主动轮询，才能把滞留在 CanTp FIFO 里的请求取出来。</li>
</ol>
]]></description><link>https://forum.ytmicro.com/post/10348</link><guid isPermaLink="true">https://forum.ytmicro.com/post/10348</guid><dc:creator><![CDATA[jiankang_wang]]></dc:creator><pubDate>Tue, 01 Dec 2026 08:29:13 GMT</pubDate></item></channel></rss>