<?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: i.MX8QXP FLEXCAN1 not working in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1158493#M162456</link>
    <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;The flexcan on 8QX is implemented as below :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Power domain of CAN1/CAN2 is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;child domain&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of CAN0's&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;FlexCAN0,CAN1/CAN2 share the clock root, SCFW provides CAN0 clock control list(interface) only to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;enable or disable&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the clock.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;So&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;when use CAN1/CAN2 you need to power on CAN0 as well, take CAN1 for exampe :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;    if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_0, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
    {
        PRINTF("Error: Failed to power on FLEXCAN0\r\n");
    }
        if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_1, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
    {
        PRINTF("Error: Failed to power on FLEXCAN1\r\n");
    }​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Flexcan clock table should all set to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CAN0&lt;/STRONG&gt;&amp;nbsp;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fsl_clock.h&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as below , as scfw only provides control interface for CAN0, the new package for 8QX will be available soon with the patch.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;#define FLEXCAN_CLOCKS                                     \
    {                                                      \
        kCLOCK_DMA_Can0, kCLOCK_DMA_Can0, kCLOCK_DMA_Can0, \
    }&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 08:15:22 GMT</pubDate>
    <dc:creator>Zodiac</dc:creator>
    <dc:date>2020-09-24T08:15:22Z</dc:date>
    <item>
      <title>i.MX8QXP FLEXCAN1 not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044105#M153749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo NXP Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have successfully configured FlexCAN0 in M4, and it is working perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem occurs when I want to configure FlexCAN1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Reference manual for CAN0 , CAN1 and CAN2, they all use the same clock gate.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109016i9CB946FAB28D4A39/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109017i25530DE0A94ADEC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Each CAN module is assigned to different LPCG_REGS. The driver code from Imx8qxp SDK CM4, As shown below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #172b4d; background-color: #f4f5f7; font-weight: 400;"&gt;kCLOCK_DMA_Can0 = LPCG_TUPLE(SC_R_CAN_0, ADMA__LPCG_CAN0_IPG_CLK_BASE),&lt;/SPAN&gt;&lt;BR style="color: #172b4d; background-color: #f4f5f7; font-weight: 400;" /&gt;&lt;SPAN style="color: #172b4d; background-color: #f4f5f7; font-weight: 400;"&gt;kCLOCK_DMA_Can1 = LPCG_TUPLE(SC_R_CAN_1, ADMA__LPCG_CAN1_IPG_CLK_BASE),&lt;/SPAN&gt;&lt;BR style="color: #172b4d; background-color: #f4f5f7; font-weight: 400;" /&gt;&lt;SPAN style="color: #172b4d; background-color: #f4f5f7; font-weight: 400;"&gt;kCLOCK_DMA_Can2 = LPCG_TUPLE(SC_R_CAN_2, ADMA__LPCG_CAN2_IPG_CLK_BASE),&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;The Function in M4 try to enable the clock in CM4 for FlexCAN1 using &lt;STRONG style="color: #3d3d3d;"&gt;kCLOCK_DMA_Can1&lt;/STRONG&gt;:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;/* Enable FlexCAN clock. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CLOCK_EnableClock(s_flexcanClock&lt;/SPAN&gt;&lt;SPAN class=""&gt;[instance]&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/*&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;Then the Function Below try to verify the&amp;nbsp;&lt;STRONG style="color: #3d3d3d;"&gt;kCLOCK_DMA_Can1&amp;nbsp;&lt;/STRONG&gt;resource with SCFW&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;/*!&lt;/P&gt;&lt;UL style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;&lt;LI&gt;brief Enable the clock for specific IP, with gate setting.&lt;BR /&gt;*&lt;/LI&gt;&lt;LI&gt;param name Which clock to enable, see \ref clock_ip_name_t.&lt;/LI&gt;&lt;LI&gt;param gate 0: clock always on, 1: HW auto clock gating.&lt;/LI&gt;&lt;LI&gt;return true if success,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;false if failure&lt;/STRONG&gt;.&lt;BR /&gt;*/&lt;/LI&gt;&lt;/UL&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;err = sc_pm_clock_enable(ipcHandle, LPCG_TUPLE_RSRC(name), SC_PM_CLK_PER, true, (bool)gate);&lt;/P&gt;&lt;P&gt;Then it returns an error message: --&amp;gt;&lt;STRONG style="color: #de350b; background-color: #f4f5f7;"&gt;SC_ERR_UNAVAILABLE 6U /&lt;/STRONG&gt;&lt;SPAN style="color: #de350b; background-color: #f4f5f7;"&gt;!&amp;lt; Unavailable (out of resources)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #de350b; background-color: #f4f5f7;"&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This means t&lt;STRONG style="color: #172b4d; background-color: #f4f5f7;"&gt;he m4 tries to communicate with SCFW for VALID resouce or dma_clock for CAN1, and this instance is missing in SCFW.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #172b4d; background-color: #f4f5f7;"&gt;In SCFW only CAN0 was assigned with Clock&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109049i81B1DF516A09392E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The reason for this failure is when CAN1 is enabled it tries to enable the clock gate with&amp;nbsp;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;&lt;STRONG style="color: #3d3d3d;"&gt;kCLOCK_DMA_Can1 .&amp;nbsp;&lt;/STRONG&gt;This is not being implemented in SCFW.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;--First I configured CAN0 ,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;After that CAN1 ,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;Then again CAN1 has the same error.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;Is there any valid solution for CAN0 and CAN1 in M4 to run parallely?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;Kind Regards,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #f4f5f7; color: #172b4d; font-weight: 400; "&gt;&lt;SPAN&gt;Hossain&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2020 18:58:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044105#M153749</guid>
      <dc:creator>mosaddek_hossai</dc:creator>
      <dc:date>2020-07-30T18:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP FLEXCAN1 not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044106#M153750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi MD Mosaddek Hossain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example of FelxCan (SC_P_FLEXCAN0_) resource change can be found in tutorial&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-341481"&gt;System Controller Firmware 101 - Resource management service&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please use sc_fw_api_qx_b0.pdf included in &lt;A href="https://www.nxp.com/webapp/Download?colCode=L5.4.24_2.1.0_SCFWKIT-1.5.0&amp;amp;appType=license" style="box-sizing: border-box; background-color: transparent; color: #215bd6; text-decoration: none; cursor: pointer;"&gt;SCFW Porting Kit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109086iB12D9F6D39918117/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.jpg" alt="pastedImage_2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109131iB8C43C64A93C3FAE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.jpg" alt="pastedImage_3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 05:06:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044106#M153750</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-07-31T05:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP FLEXCAN1 not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044107#M153751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply. The resouce list has CAN_1 as you have mentioned in your reply, I have also initialized the resources for CAN_0 and CAN_1 for m4 in SCFW:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCFW:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt; BRD_ERR (rm_set_resource_movable( pt_boot, SC_R_CAN_0, SC_R_CAN_1,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt; SC_TRUE));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;The screenshot that I provided is also from&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;sc_fw_api_qx_b0.pdf but from CLOCK list:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109360iB43F07F90661B561/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;CM4:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;Test 1 )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Initialize CAN0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;&lt;STRONG style="color: #3d3d3d;"&gt;CAN0&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-weight: 400;"&gt;&amp;nbsp;:- working&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Flex_CAN0 is working perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test 2)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;Flex_CAN1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-weight: 400;"&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Initialize CAN1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-weight: 400;"&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;&lt;STRONG style="color: #3d3d3d;"&gt;CAN1&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-weight: 400;"&gt;&amp;nbsp;:-&amp;nbsp; not working&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Initialized CAN1 in similar way as CAN_0. Does not work. As it cannot enable clock for FLEXCAN_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_11.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109208i6141594709C051F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_11.png" alt="pastedImage_11.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;When &lt;STRONG&gt;sc_pm_clock_enable&amp;nbsp;&lt;/STRONG&gt;function tries to enable the clock Gate, it sends an error "6" -&amp;gt;&amp;nbsp;&lt;SPAN style="color: #de350b; background-color: #f4f5f7;"&gt;Unavailable (out of resources)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_13.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109276iB817A6C0CC15308E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_13.png" alt="pastedImage_13.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; : ; color: #51626f; font-size: 13px; "&gt;Test 3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Initialize CAN0 resource first , Then CAN1 resource and initialize Flexcan_init with FLEXCAN1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;As mentioned in another thread:&amp;nbsp;&lt;SPAN lang="en-US" style="font-size: 14.6667px;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/1313876?commentID=1313876#comment-1313876" style="font-size: 14.6667px;" target="_blank"&gt;https://community.nxp.com/message/1313876?commentID=1313876#comment-1313876&lt;/A&gt;&amp;nbsp;to enable both resources CAN_0 and CAN_1&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;SPAN lang="en-US" style="font-size: 14.6667px;"&gt;Quote from &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jimmychan"&gt;jimmychan&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;SPAN lang="en-US" style="font-size: 14.6667px;"&gt;&amp;gt; "&lt;SPAN style="background-color: #ffffff;"&gt;This will enable the clock as well, but if you use SC_R_CAN_1, I don't believe the clock will get enabled, which also explains why when you initialize CAN_0, CAN_1 then works.&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;SPAN lang="en-US" style="font-size: 14.6667px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;&lt;SPAN lang="en-US" style="font-size: 14.6667px;"&gt;I have also tried it --&amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;#if defined(BODY_FLEX_CAN)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_0, SC_PM_PW_MODE_ON) != SC_ERR_NONE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; PRINTF("Error: Failed to power on FLEXCAN\r\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_1, SC_PM_PW_MODE_ON) != SC_ERR_NONE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; PRINTF("Error: Failed to power on FLEXCAN\r\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; #endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;if (sc_pm_set_resource_power_mode(ipc, SC_R_IRQSTR_M4_0, SC_PM_PW_MODE_ON) != SC_ERR_NONE)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; PRINTF("Error: Failed to power on IRQSTR\r\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; "&gt;Also the clock does not work, FLEX_CAN1 failed to initialize.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; "&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; font-size: 13px; "&gt;Test 4)&lt;/SPAN&gt;:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; "&gt;Initialize CAN0 and then CAN1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;Initialize CAN_0 :-&amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_16.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109539iB54B6C8C9E938973/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_16.png" alt="pastedImage_16.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;Flex_CAN_0 --&amp;gt; kclock_DMA_CAN0 --&amp;gt; initialized successfully&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_17.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/109634i30AF1D37DCF84747/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_17.png" alt="pastedImage_17.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&lt;STRONG&gt;CAN0&lt;/STRONG&gt;&amp;nbsp;:- working properly&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;After initialization of CAN0, initialize CAN1. It FAILS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN&gt;Flex_CAN_1--&amp;gt; kclock_DMA_CAN1 --&amp;gt; initialization Failed&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;SPAN&gt;&lt;STRONG&gt;CAN1&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;:- NOT working in &lt;STRONG&gt;M4 imx8qxp&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 10:23:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044107#M153751</guid>
      <dc:creator>mosaddek_hossai</dc:creator>
      <dc:date>2020-07-31T10:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP FLEXCAN1 not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044108#M153752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo Igor,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Found a bug in the driver: [fsl_flexcan.h]&lt;BR /&gt;FIX: --&amp;gt;&amp;nbsp; kCLOCK_DMA_Can1 = LPCG_TUPLE(SC_R_CAN_0, ADMA__LPCG_CAN1_IPG_CLK_BASE), /*CHanged&amp;nbsp; the SC_R_CAN_1 --&amp;gt; SC_R_CAN_0 source*/&lt;BR /&gt;Now the clock is enabled for&amp;nbsp;&lt;STRONG&gt;ADMA__LPCG_CAN1_IPG_CLK_BASE&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;But still the CAN1 is not enabled&lt;BR /&gt;&lt;P&gt;base-&amp;gt;MCR |= CAN_MCR_MDIS_MASK;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error : /* Wait FlexCAN enter low-power mode. */&lt;/STRONG&gt;&lt;BR /&gt; while (0U == (base-&amp;gt;MCR &amp;amp; CAN_MCR_LPMACK_MASK))&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Hossain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 11:34:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1044108#M153752</guid>
      <dc:creator>mosaddek_hossai</dc:creator>
      <dc:date>2020-07-31T11:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8QXP FLEXCAN1 not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1158493#M162456</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;The flexcan on 8QX is implemented as below :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Power domain of CAN1/CAN2 is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;child domain&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of CAN0's&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;FlexCAN0,CAN1/CAN2 share the clock root, SCFW provides CAN0 clock control list(interface) only to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;enable or disable&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the clock.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;So&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;when use CAN1/CAN2 you need to power on CAN0 as well, take CAN1 for exampe :&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;    if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_0, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
    {
        PRINTF("Error: Failed to power on FLEXCAN0\r\n");
    }
        if (sc_pm_set_resource_power_mode(ipc, SC_R_CAN_1, SC_PM_PW_MODE_ON) != SC_ERR_NONE)
    {
        PRINTF("Error: Failed to power on FLEXCAN1\r\n");
    }​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Contributor-III lia-component-message-view-widget-author-username"&gt;&lt;SPAN class=""&gt;Flexcan clock table should all set to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;CAN0&lt;/STRONG&gt;&amp;nbsp;in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fsl_clock.h&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as below , as scfw only provides control interface for CAN0, the new package for 8QX will be available soon with the patch.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE class="lia-code-sample  language-c"&gt;&lt;CODE&gt;#define FLEXCAN_CLOCKS                                     \
    {                                                      \
        kCLOCK_DMA_Can0, kCLOCK_DMA_Can0, kCLOCK_DMA_Can0, \
    }&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a try.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 08:15:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8QXP-FLEXCAN1-not-working/m-p/1158493#M162456</guid>
      <dc:creator>Zodiac</dc:creator>
      <dc:date>2020-09-24T08:15:22Z</dc:date>
    </item>
  </channel>
</rss>

