<?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>FreeMASTER中的主题 Re: Freemaster CAN Driver issue</title>
    <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560634#M1205</link>
    <description>&lt;P&gt;Are you using processor expert to configure your board ?&lt;/P&gt;
&lt;P&gt;If so, could you share your CAN configuration (pinMux, flexCAN) ?&lt;/P&gt;
&lt;P&gt;That example is configured to work by default over UART. In order yo use CAN communication you would need to:&lt;BR /&gt;1. Configure CAN peripheral&lt;BR /&gt;2. Configure CAN pins&lt;BR /&gt;3. Call&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;FLEXCAN_DRV_Init&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;in the &lt;EM&gt;&lt;STRONG&gt;initDemo()&lt;/STRONG&gt;&lt;/EM&gt; function&lt;BR /&gt;4. Enable CAN interrupts (if you want to use FreeMASTER SHORT/LONG INTERRUPT mode)&lt;BR /&gt;5. Update freemaster_cfg.h to use CAN instead of UART&lt;/P&gt;
&lt;P&gt;I commented the battery setup (I can not test a e2e scenario as I don't have a corresponding setup) and added the CAN configuration as per steps described above and was able to connect to the board from FreeMASTER GUI.&lt;/P&gt;
&lt;P&gt;Note: by default SDK enables CAN abort mechanism, so I had to disable it manually:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;/* Enter Freeze mode */
CAN0-&amp;gt;MCR |= (CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);
CAN0-&amp;gt;MCR &amp;amp;= ~CAN_MCR_MDIS_MASK;
while((CAN0-&amp;gt;MCR &amp;amp; CAN_MCR_FRZACK_MASK ) == 0){}
/* Disable abort mechanism  MCR[AEN] = 0 */
CAN0-&amp;gt;MCR &amp;amp;= ~CAN_MCR_AEN_MASK;
/* Enable the FlexCAN module */
CAN0-&amp;gt;MCR &amp;amp;= ~(CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);&lt;/LI-CODE&gt;
&lt;P&gt;Hope it helps,&lt;BR /&gt;Iulian&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 12:53:45 GMT</pubDate>
    <dc:creator>iulian_stan</dc:creator>
    <dc:date>2022-11-28T12:53:45Z</dc:date>
    <item>
      <title>Freemaster CAN Driver issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1558229#M1200</link>
      <description>&lt;P&gt;We are getting the following bus fault and hard fault when we are trying to execute the freemaster example application code for CAN communication. It fails exactly at these line in freemaster_can.c file.&lt;/P&gt;&lt;P&gt;/* configure CAN receiving (used by FlexCAN to setup MB) */&lt;BR /&gt;FMSTR_CAN_RINIT (FMSTR_CAN_CMDID_IDR0, FMSTR_CAN_CMDID_IDR1, \&lt;BR /&gt;&amp;nbsp;FMSTR_CAN_CMDID_IDR2, FMSTR_CAN_CMDID_IDR3);&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sathish1_0-1669184037800.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/201349i2C4B670756360B78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sathish1_0-1669184037800.png" alt="sathish1_0-1669184037800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sathish1_1-1669184169181.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/201350iC09EBC8B92F432EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sathish1_1-1669184169181.png" alt="sathish1_1-1669184169181.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Kindly help us on how to resolve this issue.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 06:22:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1558229#M1200</guid>
      <dc:creator>sathish1</dc:creator>
      <dc:date>2022-11-23T06:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster CAN Driver issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560515#M1201</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/87767"&gt;@sathish1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Are you using a custom demo application or a default example that comes with FreeMASTER Driver ?&lt;/P&gt;&lt;P&gt;If it's a custom demo could you please provide the source&amp;nbsp;(a link) of the application.&lt;/P&gt;&lt;P&gt;Iulian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 09:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560515#M1201</guid>
      <dc:creator>iulian_stan</dc:creator>
      <dc:date>2022-11-28T09:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster CAN Driver issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560611#M1204</link>
      <description>&lt;P&gt;We have downloaded the BCC SW Driver Package from Docstore&amp;nbsp;&lt;A href="https://www.nxp.com/webapp/sps/download/license.jsp?colCode=EMBEDDED-SW-BCC-MC33771C&amp;amp;appType=file1&amp;amp;DOWNLOAD_ID=null" target="_blank"&gt;BCC SW Driver Package for MC33771C and MC33772C(Lite Version) (nxp.com)&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 12:06:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560611#M1204</guid>
      <dc:creator>sathish1</dc:creator>
      <dc:date>2022-11-28T12:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster CAN Driver issue</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560634#M1205</link>
      <description>&lt;P&gt;Are you using processor expert to configure your board ?&lt;/P&gt;
&lt;P&gt;If so, could you share your CAN configuration (pinMux, flexCAN) ?&lt;/P&gt;
&lt;P&gt;That example is configured to work by default over UART. In order yo use CAN communication you would need to:&lt;BR /&gt;1. Configure CAN peripheral&lt;BR /&gt;2. Configure CAN pins&lt;BR /&gt;3. Call&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;FLEXCAN_DRV_Init&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;in the &lt;EM&gt;&lt;STRONG&gt;initDemo()&lt;/STRONG&gt;&lt;/EM&gt; function&lt;BR /&gt;4. Enable CAN interrupts (if you want to use FreeMASTER SHORT/LONG INTERRUPT mode)&lt;BR /&gt;5. Update freemaster_cfg.h to use CAN instead of UART&lt;/P&gt;
&lt;P&gt;I commented the battery setup (I can not test a e2e scenario as I don't have a corresponding setup) and added the CAN configuration as per steps described above and was able to connect to the board from FreeMASTER GUI.&lt;/P&gt;
&lt;P&gt;Note: by default SDK enables CAN abort mechanism, so I had to disable it manually:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;/* Enter Freeze mode */
CAN0-&amp;gt;MCR |= (CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);
CAN0-&amp;gt;MCR &amp;amp;= ~CAN_MCR_MDIS_MASK;
while((CAN0-&amp;gt;MCR &amp;amp; CAN_MCR_FRZACK_MASK ) == 0){}
/* Disable abort mechanism  MCR[AEN] = 0 */
CAN0-&amp;gt;MCR &amp;amp;= ~CAN_MCR_AEN_MASK;
/* Enable the FlexCAN module */
CAN0-&amp;gt;MCR &amp;amp;= ~(CAN_MCR_FRZ_MASK | CAN_MCR_HALT_MASK);&lt;/LI-CODE&gt;
&lt;P&gt;Hope it helps,&lt;BR /&gt;Iulian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 12:53:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-CAN-Driver-issue/m-p/1560634#M1205</guid>
      <dc:creator>iulian_stan</dc:creator>
      <dc:date>2022-11-28T12:53:45Z</dc:date>
    </item>
  </channel>
</rss>

