<?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: Problem with CAN BUS communication (MK20DN512VLL10) in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602352#M35403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;I had a problem with connection and after fixed it, CAN bus worked properly!&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Huy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2017 02:27:36 GMT</pubDate>
    <dc:creator>huyho</dc:creator>
    <dc:date>2017-01-18T02:27:36Z</dc:date>
    <item>
      <title>Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602347#M35398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are developing a motion control board using the below processor MK20DN512VLL10.&lt;/P&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;P&gt;I have pin 100, 98, 97,72, and 71 connected to a CAN transceiver (CAN address pin 0 - 4).&amp;nbsp; I also have pin 99, 42, and 43 connected to CAN transceiver (CAN_speed, CAN_TX, and CAN_RX).&amp;nbsp; There is also a DIP switch to set the CAN address.&lt;/P&gt;&lt;P&gt;The attached is what I implemented on Processor Expert. When I integrated to our project &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.trinamic.com%2Fsupport%2Feval-kits%2Feval-kits%2Flandungsbruecke%2F" rel="nofollow" target="_blank"&gt;Landungsbruecke firmware&lt;/A&gt;, I could control the LEDs, get trace,... But there was a problem when I called CAN_SendFrame, the process was hang on when called ExitCritical() function!&lt;/P&gt;&lt;P&gt;Please tell me why?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337506"&gt;CAN_PE.tar.gz&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 04:14:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602347#M35398</guid>
      <dc:creator>huyho</dc:creator>
      <dc:date>2017-01-10T04:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602348#M35399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#define ExitCritical() \&lt;BR /&gt;&amp;nbsp;do {\&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (--SR_lock == 0u) { \&lt;BR /&gt;&amp;nbsp; /*lint -save&amp;nbsp; -e586 -e950 Disable MISRA rule (2.1,1.1) checking. */\&lt;BR /&gt;&amp;nbsp; printf("Before ExitCritical SR_reg %d\n",SR_reg);\&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ldrb r0, %[input]\n\t" /*Load register*/\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "msr FAULTMASK,r0;\n\t" /**/ \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ::[input] "m" (SR_reg)&amp;nbsp; \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : "r0");\&lt;BR /&gt;&amp;nbsp;&amp;nbsp; printf("After ExitCritical SR_reg %d\n",SR_reg);\&lt;BR /&gt;&amp;nbsp; /*lint -restore Enable MISRA rule (2.1,1.1) checking. */\&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }\&lt;BR /&gt;&amp;nbsp;} while(0)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The process continue running when I removed this line&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"msr FAULTMASK,r0;\n\t" /**/ \&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It seems that there was a problem in changing the FAULTMASK value.&lt;/P&gt;&lt;P&gt;Please help! Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 12:54:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602348#M35399</guid>
      <dc:creator>huyho</dc:creator>
      <dc:date>2017-01-10T12:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602349#M35400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huy Ho,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please refer to this K70 CAN LDD code at first, this code also use CAN1_SendFrame function, and it works ok:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/servlet/JiveServlet/download/605315-1-371647/K70_CANLDD.rar" title="https://community.nxp.com/servlet/JiveServlet/download/605315-1-371647/K70_CANLDD.rar"&gt;https://community.nxp.com/servlet/JiveServlet/download/605315-1-371647/K70_CANLDD.rar&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a new project just contains CAN LDD, use CAN1_SendFrame function and test it, whether it still has the problem.&lt;/P&gt;&lt;P&gt;Please check it at first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still have problem about it, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 12 Jan 2017 02:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602349#M35400</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-01-12T02:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602350#M35401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry Zhou,&lt;/P&gt;&lt;P&gt;Thanks for your quick response!&lt;/P&gt;&lt;P&gt;I copied the interrupt functions in CAN.c then put in &lt;SPAN class=""&gt;kinetis_sysinit.c of Landungsbruecke firmware. It did still not work. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I also connected this tool (&lt;A class="link-titled" href="http://www.can232.com/" title="http://www.can232.com/"&gt;CAN Tools | CAN Tools from LAWICEL AB&lt;/A&gt;&amp;nbsp;) and after opening the CAN bus by sending command "O" to bus, everything worked like a charm!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The CAN bus cannot work without opening. My question is "How do I open CAN bus by CAN module from my board code (without any tool)?".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thank a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 13:57:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602350#M35401</guid>
      <dc:creator>huyho</dc:creator>
      <dc:date>2017-01-13T13:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602351#M35402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huy Ho,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you want to without any tool in the bus.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can add another CAN node in the CAN bus which can receive your K20 CAN code, you need another CAN node which ID is the K20 send ID .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Mon, 16 Jan 2017 08:05:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602351#M35402</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-01-16T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602352#M35403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;I had a problem with connection and after fixed it, CAN bus worked properly!&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Huy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 02:27:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602352#M35403</guid>
      <dc:creator>huyho</dc:creator>
      <dc:date>2017-01-18T02:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with CAN BUS communication (MK20DN512VLL10)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602353#M35404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thank you for the information update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If your problem is solved, please mark the correct answer to close this case.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Wed, 18 Jan 2017 02:38:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Problem-with-CAN-BUS-communication-MK20DN512VLL10/m-p/602353#M35404</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-01-18T02:38:18Z</dc:date>
    </item>
  </channel>
</rss>

