<?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>S32K中的主题 CAN PAL Dev Assert Issue</title>
    <link>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1968987#M41785</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;MCU: S32K118&lt;/P&gt;&lt;P&gt;SDK :&amp;nbsp;S32SDK_S32K1XX_RTM_4.0.1&lt;/P&gt;&lt;P&gt;In the CAN Driver, can_pal.c , Can_AllocateState function there's a DEV_ASSERT check which fails:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(NO_OF_FLEXCAN_INSTS_FOR_CAN =1)&lt;/P&gt;&lt;P&gt;for (i = 0; i &amp;lt; NO_OF_FLEXCAN_INSTS_FOR_CAN; i++)&lt;BR /&gt;{&lt;BR /&gt;if (isAllocated[i] == false)&lt;BR /&gt;{&lt;BR /&gt;instanceMapping[i] = instance;&lt;BR /&gt;isAllocated[i] = true;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (i &amp;gt;= NO_OF_FLEXCAN_INSTS_FOR_CAN)&lt;BR /&gt;{&lt;BR /&gt;/* Should Never Reach Here */&lt;BR /&gt;DEV_ASSERT(false);&lt;BR /&gt;i = (NO_OF_FLEXCAN_INSTS_FOR_CAN-1U);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though value of 1 is valid for&amp;nbsp;NO_OF_FLEXCAN_INSTS_FOR_CAN I don't get it exactly why it's checked if it's equal or greated than one. Shouldn't it be just "&amp;gt;1) ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Oct 2024 14:09:18 GMT</pubDate>
    <dc:creator>zubizeratta</dc:creator>
    <dc:date>2024-10-08T14:09:18Z</dc:date>
    <item>
      <title>CAN PAL Dev Assert Issue</title>
      <link>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1968987#M41785</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;MCU: S32K118&lt;/P&gt;&lt;P&gt;SDK :&amp;nbsp;S32SDK_S32K1XX_RTM_4.0.1&lt;/P&gt;&lt;P&gt;In the CAN Driver, can_pal.c , Can_AllocateState function there's a DEV_ASSERT check which fails:&amp;nbsp;&lt;/P&gt;&lt;P&gt;(NO_OF_FLEXCAN_INSTS_FOR_CAN =1)&lt;/P&gt;&lt;P&gt;for (i = 0; i &amp;lt; NO_OF_FLEXCAN_INSTS_FOR_CAN; i++)&lt;BR /&gt;{&lt;BR /&gt;if (isAllocated[i] == false)&lt;BR /&gt;{&lt;BR /&gt;instanceMapping[i] = instance;&lt;BR /&gt;isAllocated[i] = true;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (i &amp;gt;= NO_OF_FLEXCAN_INSTS_FOR_CAN)&lt;BR /&gt;{&lt;BR /&gt;/* Should Never Reach Here */&lt;BR /&gt;DEV_ASSERT(false);&lt;BR /&gt;i = (NO_OF_FLEXCAN_INSTS_FOR_CAN-1U);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even though value of 1 is valid for&amp;nbsp;NO_OF_FLEXCAN_INSTS_FOR_CAN I don't get it exactly why it's checked if it's equal or greated than one. Shouldn't it be just "&amp;gt;1) ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 14:09:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1968987#M41785</guid>
      <dc:creator>zubizeratta</dc:creator>
      <dc:date>2024-10-08T14:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: CAN PAL Dev Assert Issue</title>
      <link>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1969167#M41797</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229964"&gt;@zubizeratta&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The second part of the&amp;nbsp;&lt;STRONG&gt;CAN_AllocateState&lt;/STRONG&gt; function should never be reached if the structure selected for allocating is available/correctly defined. It simply checks if the previous for cycle failed to allocate any of the available structures to the instances, hence the break statement in order to exit the function.&lt;/P&gt;
&lt;P&gt;Have you correctly configured the instance to initialize in the CAN_Init function? Please refer to the example if needed:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Julin_AragnM_0-1728410534509.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/303489iE782D56896D7572C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Julin_AragnM_0-1728410534509.png" alt="Julin_AragnM_0-1728410534509.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Julián&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2024 18:02:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1969167#M41797</guid>
      <dc:creator>Julián_AragónM</dc:creator>
      <dc:date>2024-10-08T18:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: CAN PAL Dev Assert Issue</title>
      <link>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1969595#M41831</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;Julián,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems to be allocated but I will check again if something is wrong . Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zubizeratta_0-1728455713988.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/303654iF98F9071F99BFA9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zubizeratta_0-1728455713988.png" alt="zubizeratta_0-1728455713988.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zubizeratta_1-1728455734907.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/303655i80BDA99C9D32BC38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zubizeratta_1-1728455734907.png" alt="zubizeratta_1-1728455734907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 06:35:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CAN-PAL-Dev-Assert-Issue/m-p/1969595#M41831</guid>
      <dc:creator>zubizeratta</dc:creator>
      <dc:date>2024-10-09T06:35:46Z</dc:date>
    </item>
  </channel>
</rss>

