<?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>LPC Microcontrollers中的主题 Query regarding CAN driver implementation on LPC1768</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Query-regarding-CAN-driver-implementation-on-LPC1768/m-p/2058925#M57864</link>
    <description>&lt;P&gt;I am implementing a CAN driver for the LPC1768 microcontroller. During testing , I am encountering an ERRBIT : start of frame (SOF) in CAN&amp;nbsp; interrupt and capture status register(CANxICR) and I have not connected the receiver to the board i.e there is no receiving node on CAN bus.&lt;/P&gt;&lt;P&gt;My setup:&lt;/P&gt;&lt;P&gt;Software: keil u4&lt;/P&gt;&lt;P&gt;Microcontroller: LPC1768( ARM Cortex M3)&lt;/P&gt;&lt;P&gt;Baud rate: 500kbps&lt;/P&gt;&lt;P&gt;pin configuration: TD1(P0.1), RD1(P0.0)&lt;/P&gt;&lt;P&gt;CANxBTR register value: 0x00070004;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transmitter snippet:&lt;/P&gt;&lt;P&gt;void CAN_Transmit(uint8 CAN_Controller, CAN_msg *msg) {&lt;BR /&gt;if(CAN_Controller==1){&lt;BR /&gt;while (!(CAN1-&amp;gt;SR &amp;amp; (1 &amp;lt;&amp;lt; 2))); // Wait until TX buffer is empty&lt;/P&gt;&lt;P&gt;CAN1-&amp;gt;TFI1 = ((msg-&amp;gt;len &amp;amp;0xf)&amp;lt;&amp;lt; 16); // Set data length&lt;BR /&gt;CAN1-&amp;gt;TID1 = msg-&amp;gt;id; // Set identifier&lt;BR /&gt;CAN1-&amp;gt;TDA1 = (msg-&amp;gt;data[0]) | (msg-&amp;gt;data[1] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[2] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[3] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN1-&amp;gt;TDB1 = (msg-&amp;gt;data[4]) | (msg-&amp;gt;data[5] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[6] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[7] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN1-&amp;gt;CMR = (1 &amp;lt;&amp;lt; 5) | (1 &amp;lt;&amp;lt; 0); // Request transmission&lt;BR /&gt;while(!(CAN1-&amp;gt;GSR&amp;amp; (0x01&amp;lt;&amp;lt;3)));&lt;BR /&gt;}&lt;BR /&gt;else if(CAN_Controller==2){&lt;BR /&gt;while (!(CAN2-&amp;gt;SR &amp;amp; (1 &amp;lt;&amp;lt; 2))); // Wait until TX buffer is empty&lt;/P&gt;&lt;P&gt;CAN2-&amp;gt;TFI1 = ((msg-&amp;gt;len&amp;amp;0xf) &amp;lt;&amp;lt; 16); // Set data length&lt;BR /&gt;CAN2-&amp;gt;TID1 = msg-&amp;gt;id; // Set identifier&lt;BR /&gt;CAN2-&amp;gt;TDA1 = (msg-&amp;gt;data[0]) | (msg-&amp;gt;data[1] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[2] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[3] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN2-&amp;gt;TDB1 = (msg-&amp;gt;data[4]) | (msg-&amp;gt;data[5] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[6] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[7] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN2-&amp;gt;CMR = (1 &amp;lt;&amp;lt; 5) | (1 &amp;lt;&amp;lt; 0); // Request transmission&lt;BR /&gt;while(!(CAN2-&amp;gt;GSR&amp;amp; (0x01&amp;lt;&amp;lt;3)));&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I have verified my pin configuration and CAN settings but cannot identify why the error is persisting.&lt;/P&gt;&lt;P&gt;Request:&lt;BR /&gt;Could anyone suggest what might be causing the ERRBIT: Start of Frame and how to resolve it? Is it related to incorrect baud rate settings, pin configurations, or hardware connections?&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 17:56:26 GMT</pubDate>
    <dc:creator>Nisarga</dc:creator>
    <dc:date>2025-03-10T17:56:26Z</dc:date>
    <item>
      <title>Query regarding CAN driver implementation on LPC1768</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Query-regarding-CAN-driver-implementation-on-LPC1768/m-p/2058925#M57864</link>
      <description>&lt;P&gt;I am implementing a CAN driver for the LPC1768 microcontroller. During testing , I am encountering an ERRBIT : start of frame (SOF) in CAN&amp;nbsp; interrupt and capture status register(CANxICR) and I have not connected the receiver to the board i.e there is no receiving node on CAN bus.&lt;/P&gt;&lt;P&gt;My setup:&lt;/P&gt;&lt;P&gt;Software: keil u4&lt;/P&gt;&lt;P&gt;Microcontroller: LPC1768( ARM Cortex M3)&lt;/P&gt;&lt;P&gt;Baud rate: 500kbps&lt;/P&gt;&lt;P&gt;pin configuration: TD1(P0.1), RD1(P0.0)&lt;/P&gt;&lt;P&gt;CANxBTR register value: 0x00070004;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transmitter snippet:&lt;/P&gt;&lt;P&gt;void CAN_Transmit(uint8 CAN_Controller, CAN_msg *msg) {&lt;BR /&gt;if(CAN_Controller==1){&lt;BR /&gt;while (!(CAN1-&amp;gt;SR &amp;amp; (1 &amp;lt;&amp;lt; 2))); // Wait until TX buffer is empty&lt;/P&gt;&lt;P&gt;CAN1-&amp;gt;TFI1 = ((msg-&amp;gt;len &amp;amp;0xf)&amp;lt;&amp;lt; 16); // Set data length&lt;BR /&gt;CAN1-&amp;gt;TID1 = msg-&amp;gt;id; // Set identifier&lt;BR /&gt;CAN1-&amp;gt;TDA1 = (msg-&amp;gt;data[0]) | (msg-&amp;gt;data[1] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[2] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[3] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN1-&amp;gt;TDB1 = (msg-&amp;gt;data[4]) | (msg-&amp;gt;data[5] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[6] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[7] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN1-&amp;gt;CMR = (1 &amp;lt;&amp;lt; 5) | (1 &amp;lt;&amp;lt; 0); // Request transmission&lt;BR /&gt;while(!(CAN1-&amp;gt;GSR&amp;amp; (0x01&amp;lt;&amp;lt;3)));&lt;BR /&gt;}&lt;BR /&gt;else if(CAN_Controller==2){&lt;BR /&gt;while (!(CAN2-&amp;gt;SR &amp;amp; (1 &amp;lt;&amp;lt; 2))); // Wait until TX buffer is empty&lt;/P&gt;&lt;P&gt;CAN2-&amp;gt;TFI1 = ((msg-&amp;gt;len&amp;amp;0xf) &amp;lt;&amp;lt; 16); // Set data length&lt;BR /&gt;CAN2-&amp;gt;TID1 = msg-&amp;gt;id; // Set identifier&lt;BR /&gt;CAN2-&amp;gt;TDA1 = (msg-&amp;gt;data[0]) | (msg-&amp;gt;data[1] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[2] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[3] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN2-&amp;gt;TDB1 = (msg-&amp;gt;data[4]) | (msg-&amp;gt;data[5] &amp;lt;&amp;lt; &lt;LI-EMOJI id="lia_smiling-face-with-sunglasses" title=":smiling_face_with_sunglasses:"&gt;&lt;/LI-EMOJI&gt; | (msg-&amp;gt;data[6] &amp;lt;&amp;lt; 16) | (msg-&amp;gt;data[7] &amp;lt;&amp;lt; 24);&lt;BR /&gt;CAN2-&amp;gt;CMR = (1 &amp;lt;&amp;lt; 5) | (1 &amp;lt;&amp;lt; 0); // Request transmission&lt;BR /&gt;while(!(CAN2-&amp;gt;GSR&amp;amp; (0x01&amp;lt;&amp;lt;3)));&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I have verified my pin configuration and CAN settings but cannot identify why the error is persisting.&lt;/P&gt;&lt;P&gt;Request:&lt;BR /&gt;Could anyone suggest what might be causing the ERRBIT: Start of Frame and how to resolve it? Is it related to incorrect baud rate settings, pin configurations, or hardware connections?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 17:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Query-regarding-CAN-driver-implementation-on-LPC1768/m-p/2058925#M57864</guid>
      <dc:creator>Nisarga</dc:creator>
      <dc:date>2025-03-10T17:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding CAN driver implementation on LPC1768</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Query-regarding-CAN-driver-implementation-on-LPC1768/m-p/2059245#M57868</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/247852"&gt;@Nisarga&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;&lt;SPAN&gt;Please connect the CAN receiver. CAN transmission requires an acknowledgment from the receiver, so it is necessary to connect a receiver. For the code implementation, you can refer to the CAN demo provided under LPCOpen.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorAlice_Yang_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="666.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327438i79FFD9C32E7B51CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="666.jpg" alt="666.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 06:43:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Query-regarding-CAN-driver-implementation-on-LPC1768/m-p/2059245#M57868</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2025-03-11T06:43:37Z</dc:date>
    </item>
  </channel>
</rss>

