<?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: Transmitting CAN message periodically MDBT MPC5744P in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937847#M3513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My model is working now. T‌hank you for your help and explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Aug 2019 09:10:06 GMT</pubDate>
    <dc:creator>aungkm</dc:creator>
    <dc:date>2019-08-02T09:10:06Z</dc:date>
    <item>
      <title>Transmitting CAN message periodically MDBT MPC5744P</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937844#M3510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to send multiple CAN messages with different period. I am using the counter limited block and compare to constant block to periodically trigger the CAN send message block.&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/84708i1E127AE83470D018/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;I could periodically transmit multiple messages with the same period by using this method but I am having trouble transmitting multiple messages with different period. I could transmit multiple messages if I didn't use the above mentioned two blocks but then the messages were not being sent periodically. Is there another way to transmit the message periodically? Moreover, I could not use Tx complete block with the above-mentioned method. I have attached my model which was created by 2018b.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 10:06:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937844#M3510</guid>
      <dc:creator>aungkm</dc:creator>
      <dc:date>2019-08-01T10:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Transmitting CAN message periodically MDBT MPC5744P</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937845#M3511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/aungkm@outlook.com"&gt;aungkm@outlook.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for you to periodically transmit messages (or do anything else for that manner), you have 2 choices:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;software scheduling (via software timer)&lt;/LI&gt;&lt;LI&gt;hardware scheduling (via hardware timer)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the many approaches available for software scheduling is what you did here - enabling a subsystem via a signal (limited counter in your case). The software approach&amp;nbsp;I'd recommend is described &lt;A _jive_internal="true" href="https://community.nxp.com/thread/488575"&gt;here&lt;/A&gt;, in a nice article wrote by &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/gramirezv"&gt;gramirezv&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to go for the hardware triggering, you can do this by using a PIT (periodic interrupt timer). You can find it in our toolbox, under Core and system blocks -&amp;gt; PIT Timer.&lt;/P&gt;&lt;P&gt;&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/84451i3955E1F2512C41A6/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;/P&gt;&lt;P&gt;You can set the period here, and trigger a subsystem with this block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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/84365i5DF4D9A4922DE557/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that inside the triggered subsystem you'll have to use a trigger block, setting it's type to&amp;nbsp;&lt;STRONG&gt;function-call&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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/84523i3DDE527FCE8129F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 12:43:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937845#M3511</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-08-01T12:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Transmitting CAN message periodically MDBT MPC5744P</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937846#M3512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/aungkm@outlook.com"&gt;aungkm@outlook.com&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the CAN ISR usage, you can use the TX Complete event for every example in which you are sending something over CAN. Something that you must be aware is that the ISR block should be executed after the CAN Config block. You can view this either in the executed code, either by editing the priority in the model - you can do this by right clicking on a block -&amp;gt; Properties -&amp;gt; Priority. Note that lower number = HIGHer priority. Another thing you could do is hit CTRL + D while in the model, and watch the order that Simulink gives the blocks (e.g.: Config block has 0:12, and CAN ISR block has 0:18 - so in this example, the config block would be the 12th block for which code will be generated, while ISR will be the 18th).&lt;/P&gt;&lt;P&gt;&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/84342i26FC875D360E1406/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;/P&gt;&lt;P&gt;I have attached a working model here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: a TX complete event will be triggered after each CAN Send, so the toggle of the red LED in the example attached is actually made up of more toggles, as we execute 3 consecutive CAN writes.&lt;BR /&gt;(initial LED state - off)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st stage - 3 frames sent&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to ON&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to off&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to ON&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd stage - other 3 frames sent&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to off&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to&amp;nbsp;ON&lt;/P&gt;&lt;P&gt;CAN Send - LED toggle to&amp;nbsp;off&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[etc]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Razvan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 13:10:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937846#M3512</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2019-08-01T13:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Transmitting CAN message periodically MDBT MPC5744P</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937847#M3513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/constantinrazvan.chivu"&gt;constantinrazvan.chivu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My model is working now. T‌hank you for your help and explanation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 09:10:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Transmitting-CAN-message-periodically-MDBT-MPC5744P/m-p/937847#M3513</guid>
      <dc:creator>aungkm</dc:creator>
      <dc:date>2019-08-02T09:10:06Z</dc:date>
    </item>
  </channel>
</rss>

