<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get CAN ID in CanIf User RxIndication callback? in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-to-get-CAN-ID-in-CanIf-User-RxIndication-callback/m-p/2298499#M56292</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/258618"&gt;@Soratari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q1.&amp;nbsp;&lt;/STRONG&gt;Yes, stub modules are meant to be edited/replaced. Since the CanIf module is a stub, it just provides the&amp;nbsp;&lt;SPAN&gt;header files required by the CAN driver, such as CanIf_Cbk.h.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q2.&amp;nbsp;&lt;/STRONG&gt;No, it would not violate ASR architecture, as long as you follow the guidelines and do not change the standardize function names, variables, etc.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q3.&amp;nbsp;&lt;/STRONG&gt;Normally,&amp;nbsp;stub modules are for testing purposes. You should use CanIf, EthIf &amp;amp; LinIf from a third-party provider, such as Elektrobit (EB), Vector, etc. However, for debugging purposes, it is fine to modify it yourself.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2026 16:47:58 GMT</pubDate>
    <dc:creator>Julián_AragónM</dc:creator>
    <dc:date>2026-01-22T16:47:58Z</dc:date>
    <item>
      <title>How to get CAN ID in CanIf User RxIndication callback?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-get-CAN-ID-in-CanIf-User-RxIndication-callback/m-p/2297703#M56266</link>
      <description>&lt;P&gt;Hello, I am using&amp;nbsp;S32K144&amp;nbsp;with SW32K1_S32M24x_RTD_R21-11_3.0.0&amp;nbsp;and have configured CanIf to&amp;nbsp;use a custom callback function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;My Configuration:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;CanIfRxPduUserRxIndicationName&amp;nbsp;is set to&amp;nbsp;"Service_CanIf_RxIndication"&lt;BR /&gt;This callback&amp;nbsp;is invoked from&amp;nbsp;CanIf_RxIndication()&amp;nbsp;when a CAN message is received.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;Problem:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;I noticed that in&amp;nbsp;CanIf_RxIndication(), the&amp;nbsp;CAN&amp;nbsp;ID is available&amp;nbsp;through the&amp;nbsp;Mailbox-&amp;gt;CanId&amp;nbsp;parameter. However, in my&amp;nbsp;Service_CanIf_RxIndication()&amp;nbsp;callback, I can&amp;nbsp;only receive the&amp;nbsp;PduId&amp;nbsp;- there is no way to retrieve the&amp;nbsp;actual&amp;nbsp;CAN ID. Also, I noticed that&amp;nbsp;CanIf.h&amp;nbsp;header states:&amp;nbsp;"Stub&amp;nbsp;Version - This file contains sample code only."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;My Questions:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;1. Can I modify or replace the CanIf.c stub code?&lt;BR /&gt;Since&amp;nbsp;CanIf.h&amp;nbsp;explicitly states it is a&amp;nbsp;"Stub Version" and "sample code only", is it acceptable to modify&amp;nbsp;CanIf.c&amp;nbsp;to pass the CAN ID to the user callback?&lt;/P&gt;&lt;P&gt;2. Would modifying the stub code violate AUTOSAR architecture?&lt;BR /&gt;If&amp;nbsp;I customize the CanIf stub&amp;nbsp;implementation, does this break AUTOSAR&amp;nbsp;compliance or cause any compatibility issues?&lt;/P&gt;&lt;P&gt;3. Are there any alternative solutions?&lt;BR /&gt;Is there a&amp;nbsp;recommended way to pass the CAN ID&amp;nbsp;to the upper layer callback without modifying&amp;nbsp;the CanIf source code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;Environment:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;MCU: S32K144&lt;BR /&gt;RTD Version: SW32K1_S32M24x_RTD_R21-11_3.0.0&lt;BR /&gt;IDE: S32&amp;nbsp;Design Studio 3.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 02:40:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-get-CAN-ID-in-CanIf-User-RxIndication-callback/m-p/2297703#M56266</guid>
      <dc:creator>Soratari</dc:creator>
      <dc:date>2026-01-22T02:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get CAN ID in CanIf User RxIndication callback?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-get-CAN-ID-in-CanIf-User-RxIndication-callback/m-p/2298499#M56292</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/258618"&gt;@Soratari&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q1.&amp;nbsp;&lt;/STRONG&gt;Yes, stub modules are meant to be edited/replaced. Since the CanIf module is a stub, it just provides the&amp;nbsp;&lt;SPAN&gt;header files required by the CAN driver, such as CanIf_Cbk.h.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q2.&amp;nbsp;&lt;/STRONG&gt;No, it would not violate ASR architecture, as long as you follow the guidelines and do not change the standardize function names, variables, etc.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q3.&amp;nbsp;&lt;/STRONG&gt;Normally,&amp;nbsp;stub modules are for testing purposes. You should use CanIf, EthIf &amp;amp; LinIf from a third-party provider, such as Elektrobit (EB), Vector, etc. However, for debugging purposes, it is fine to modify it yourself.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 16:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-get-CAN-ID-in-CanIf-User-RxIndication-callback/m-p/2298499#M56292</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2026-01-22T16:47:58Z</dc:date>
    </item>
  </channel>
</rss>

