<?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>MPC5xxx中的主题 MPC5744P CAN</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680606#M8137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using MPC5744P-144DC evaulation board and trying to use FlexCAN module on it.&lt;/P&gt;&lt;P&gt;I looked into two exampels, "MPC5744P-FlexCAN-simpleTXRX-GHS614" and "MPC5775K-FlexCAN_with_interrupts-S32DS_Z4_1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On examples, DATA filed of CAN message was setting byte base as follow;&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].DATA.W[1] = 0x90ABCDEF; //data1 set&lt;BR /&gt; CAN_0.MB[MB].DATA.W[0] = 0x12345678; //data0 set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I set a data longer than 1 byte?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I need to put motor speed (14bit) in DATA[0] (0~7 bit) and DATA[1] (0~5bit) and Motor status (2bit) in DATA[1] (6~7bit).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Hyuntae Choi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 May 2017 04:54:55 GMT</pubDate>
    <dc:creator>seize</dc:creator>
    <dc:date>2017-05-16T04:54:55Z</dc:date>
    <item>
      <title>MPC5744P CAN</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680606#M8137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using MPC5744P-144DC evaulation board and trying to use FlexCAN module on it.&lt;/P&gt;&lt;P&gt;I looked into two exampels, "MPC5744P-FlexCAN-simpleTXRX-GHS614" and "MPC5775K-FlexCAN_with_interrupts-S32DS_Z4_1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On examples, DATA filed of CAN message was setting byte base as follow;&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].DATA.W[1] = 0x90ABCDEF; //data1 set&lt;BR /&gt; CAN_0.MB[MB].DATA.W[0] = 0x12345678; //data0 set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I set a data longer than 1 byte?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I need to put motor speed (14bit) in DATA[0] (0~7 bit) and DATA[1] (0~5bit) and Motor status (2bit) in DATA[1] (6~7bit).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Hyuntae Choi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 04:54:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680606#M8137</guid>
      <dc:creator>seize</dc:creator>
      <dc:date>2017-05-16T04:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CAN</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680607#M8138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FlexCAN allows you to send 1-8 bytes in one message. There is DLC in message buffer structure which says, how many bytes is sent in CAN message. In the example you showed above following code is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].CS.B.DLC = 8;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //message length 8 bytes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you must set the required number of bytes and then, you can configure DATA itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of DATA.W, which configure whole word, you can use DATA.B and set every byte independently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if you want to send 2 bytes, configuration should be following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].DATA.B[0] = 0x12;&amp;nbsp;&amp;nbsp; //first data byte&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].DATA.B[1] = 0x12;&amp;nbsp; //second data byte&lt;/P&gt;&lt;P&gt;CAN_0.MB[MB].CS.B.DLC = 2;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; //message length 2 bytes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2017 07:56:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680607#M8138</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-05-16T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CAN</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680608#M8139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What if I need to send two signals as in the example [For example, I need&lt;/P&gt;&lt;P&gt;to put motor speed (14bit) in DATA[0] (0&lt;SUB&gt;7 bit) and DATA[1] (0&lt;/SUB&gt;5bit) and&lt;/P&gt;&lt;P&gt;Motor status (2bit) in DATA[1] (6~7bit). ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Motor speed = 0x2a11 which is 14 bit signal and motor status is 0x3 which&lt;/P&gt;&lt;P&gt;is 2bit signal.&lt;/P&gt;&lt;P&gt;And I need to send above two signals with DATA.B[0] and DATA.B[1].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to send two signals, do I need to put first 8 bits of motor speed&lt;/P&gt;&lt;P&gt;in DATA.B[0] and last 6 bits of motor speed and 2 bits of motor status in&lt;/P&gt;&lt;P&gt;DATA.B[1], which is very uncomfortable?&lt;/P&gt;&lt;P&gt;In this way, I need to reconfigure both signals whenever send data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function like setting the start bit of signal and length of&lt;/P&gt;&lt;P&gt;signal?&lt;/P&gt;&lt;P&gt;For example, start bit of motor speed signal = 0 and signal length of motor&lt;/P&gt;&lt;P&gt;signal = 14 bit, start bit of motor status signal = 14 and signal length =&lt;/P&gt;&lt;P&gt;2 bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Hyuntae&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-05-16 16:56 GMT+09:00 b55689 &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: MPC5744P CAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from Martin Kovar&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/b55689?et=watches.email.thread&amp;gt; in&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MPC5xxx&lt;/STRONG&gt; - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/905775?commentID=905775&amp;amp;et=watches.email.thread#comment-905775&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 01:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680608#M8139</guid>
      <dc:creator>seize</dc:creator>
      <dc:date>2017-05-17T01:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CAN</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680609#M8140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am sorry, but I do not understand your question. FlexCAN allows you to send message with 1-8 bytes. It is up to you, how you configure it. Please remember that CAN data frame does not contain data only, but there are another fields like Arbitration, Control, CRC etc., please see figure below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21095i166F726F262C4DD5/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;"In order to send two signals, do I need to put first 8 bits of motor speed in DATA.B[0] and last 6 bits of motor speed and 2 bits of motor status in DATA.B[1], which is very uncomfortable."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But this is the only way how to use it. FlexCAN always send 1 byte data, so if you have 14 bits you need to send, you must send frame with two data bytes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Is there any function like setting the start bit of signal and length of signal?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, no. FlexCAN does not have this function. Data are also divided into 1 byte blocks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 11:12:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680609#M8140</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-05-17T11:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5744P CAN</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680610#M8141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your kind reply. My question is cleared with your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hyuntae&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2017-05-17 20:13 GMT+09:00 b55689 &amp;lt;admin@community.nxp.com&amp;gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;NXP Community&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg&amp;gt;&lt;/P&gt;&lt;P&gt;Re: MPC5744P CAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reply from Martin Kovar&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/people/b55689?et=watches.email.thread&amp;gt; in&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MPC5xxx&lt;/STRONG&gt; - View the full discussion&lt;/P&gt;&lt;P&gt;&amp;lt;https://community.nxp.com/message/906240?commentID=906240&amp;amp;et=watches.email.thread#comment-906240&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 00:00:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5744P-CAN/m-p/680610#M8141</guid>
      <dc:creator>seize</dc:creator>
      <dc:date>2017-05-18T00:00:49Z</dc:date>
    </item>
  </channel>
</rss>

