<?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 Can I use two TIM Channels at the same time? in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Can-I-use-two-TIM-Channels-at-the-same-time/m-p/672246#M445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;Test environment&lt;/P&gt;&lt;P&gt;CPU: S12ZVMC128&lt;BR /&gt;Sensor: Hall Sensor Type&lt;BR /&gt;Communication: CAN&lt;/P&gt;&lt;P&gt;-----------------------------------------------&lt;/P&gt;&lt;P&gt;The simulation situation is as follows.&lt;BR /&gt;CAN RX MSG ID: 0x01, 0x03, 0x04&lt;BR /&gt;CAN TX MSG ID:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period (2.5ms): 0x07, 0x09&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period (10ms): 0x06, 0x08&lt;/P&gt;&lt;P&gt;Hall Signal Capture using Hall Sensor Port.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Problem situation&lt;BR /&gt;&amp;nbsp; When the CAN Function Module and the Hall Sensor Capture Module are individually tested, they operate without problems.&amp;nbsp;However, the Hall Sensor Port block does not work when two modules are integrated and tested.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) .Is there a problem with MBD Toolbox when using two TIM channels?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) If there is a problem, how should I send CAN MSG with periodicity?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attach the Test Program below.&lt;BR /&gt;Please check and advise if anything goes wrong.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be waiting for reply.&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-338915"&gt;TestProgram.mdl.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jun 2017 10:43:35 GMT</pubDate>
    <dc:creator>eungsoolee</dc:creator>
    <dc:date>2017-06-01T10:43:35Z</dc:date>
    <item>
      <title>Can I use two TIM Channels at the same time?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Can-I-use-two-TIM-Channels-at-the-same-time/m-p/672246#M445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---------------------------&lt;BR /&gt;Test environment&lt;/P&gt;&lt;P&gt;CPU: S12ZVMC128&lt;BR /&gt;Sensor: Hall Sensor Type&lt;BR /&gt;Communication: CAN&lt;/P&gt;&lt;P&gt;-----------------------------------------------&lt;/P&gt;&lt;P&gt;The simulation situation is as follows.&lt;BR /&gt;CAN RX MSG ID: 0x01, 0x03, 0x04&lt;BR /&gt;CAN TX MSG ID:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period (2.5ms): 0x07, 0x09&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period (10ms): 0x06, 0x08&lt;/P&gt;&lt;P&gt;Hall Signal Capture using Hall Sensor Port.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Problem situation&lt;BR /&gt;&amp;nbsp; When the CAN Function Module and the Hall Sensor Capture Module are individually tested, they operate without problems.&amp;nbsp;However, the Hall Sensor Port block does not work when two modules are integrated and tested.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) .Is there a problem with MBD Toolbox when using two TIM channels?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) If there is a problem, how should I send CAN MSG with periodicity?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attach the Test Program below.&lt;BR /&gt;Please check and advise if anything goes wrong.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will be waiting for reply.&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-338915"&gt;TestProgram.mdl.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 10:43:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Can-I-use-two-TIM-Channels-at-the-same-time/m-p/672246#M445</guid>
      <dc:creator>eungsoolee</dc:creator>
      <dc:date>2017-06-01T10:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use two TIM Channels at the same time?</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Can-I-use-two-TIM-Channels-at-the-same-time/m-p/672247#M446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 data-reactid="11"&gt;&lt;SPAN style="font-size: 15px;"&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/eungsoolee"&gt;eungsoolee&lt;/A&gt;‌,&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;1) .Is there a problem with MBD Toolbox when using two TIM channels?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;ANS: It should not be - even when you have tested the HALL alone in fact you have used 2 TIM Channels&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- TIM.1 for Hall captures&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;- TIM.0 for system clock/timer to trigger the Simulink step function on (fixed step parameter)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;If you allow me a small observation about your hall modelling - you should also have a TIM overflow block to check if the counter overflows in case you want to compute a speed like information from Hall sensors (especially at slow speeds)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;2) If there is a problem, how should I send CAN MSG with periodicity?&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;For the RX path i would probably have used a CAN Receive Data Trigger block to get the RX msg based on a interrupt when a new msg is received.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;For TX path it is correct to use a TIM&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Coming back to you issue - first thing i your try is to profile the application using the Profile Function and the Freemaster to check if the execution of each subsystem is matching your design constrains and no overflow occurs.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Then, for debugging the application i your turn to CodeWarrior MCU with attach option enabled to see the PC flow.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hope this helps!&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 05:17:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Can-I-use-two-TIM-Channels-at-the-same-time/m-p/672247#M446</guid>
      <dc:creator>Daniel_Popa</dc:creator>
      <dc:date>2017-06-02T05:17:19Z</dc:date>
    </item>
  </channel>
</rss>

