<?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のトピックeTPU2 CRANK and CAM function problem</title>
    <link>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292307#M286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'll state my problem on top and describe the setup below.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To start with I should say that I am new to eTPU/eTPU2 usage. I do have fairly extensive experience with TPU/TPU3. I have written several fairly complex TPU3 functions so have reasonably good idea how the channel hardware works.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a xPC56xxMB EVAL board with the xPC 564AADPT324S mini-module (MPC5644A, 324 pin), I am unable to make the CRANK (etpu set2) function work. It acts as if it just does not see the input signal. I have tried literally over 100 different configs, channel and engine setup, to no avail. All other functions work normally.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Codewarrior 10.4 default 5644 project with no operating system. Main program runs fine with eMIOS200, eQADC, eSCI, Flexcan modules all working.&lt;/P&gt;&lt;P&gt;Using the eTPU Graphical Configuration Tool (gct) for eTPU config and init.&lt;/P&gt;&lt;P&gt;All pads properly set in SIU.&lt;/P&gt;&lt;P&gt;ToothGen function works. Verified by oscilloscope. ToothGen crank jumpered to CRANK (channel 0) on the dev board. ToothGen cam jumpered to CAM on dev board.&lt;/P&gt;&lt;P&gt;PWM function on ch 30 works. Verified by scope.&lt;/P&gt;&lt;P&gt;To check and make sure that ch 0 actually could be configured as an input, assigned the FPM function to ch 0 and jumpered the cam signal to it. Worked and returns the correct frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; NOTE:&lt;/STRONG&gt; FPM would not work until I turned off angle mode. Probably normal, I just don't know.&lt;/P&gt;&lt;P&gt;Have read, thoroughly, every AN, I won't list them here, there are too many. Even watched the youtube video.&lt;/P&gt;&lt;P&gt;Studied the eTPU section of&amp;nbsp; MPC5644ARM. Studied ETPURM and ETPURMAD.&lt;/P&gt;&lt;P&gt;Copied the gct config from AN3769SW for engine and function setup, modifying the TCR1 prescaler to get as close to the demo TCR1 freq as possible.&lt;/P&gt;&lt;P&gt;All init functions return no error, I even went into the source of the fs_etpu_init() and fs_etpu_app_eng_pos_int() functions to bring out all of the internal error codes. Not too surprising, as the eTPU engine does appear to init properly, all other functions work properly.&lt;/P&gt;&lt;P&gt;Checked, manually, all of the config values created by the gct. All seem correct.&lt;/P&gt;&lt;P&gt;In my main app, removed int for eMIOS200, eQADC, Flexcan, and manually disabled each module in it's MCR.&lt;/P&gt;&lt;P&gt;In my main app, I tried inititing only sysclk, SIU, and eTPU only. Etpu init is by running my_system_etpu_init() followed by my_system_etpu_start() (my_system_etpu_start() starts the Global time base).&lt;/P&gt;&lt;P&gt;Have queried the engine position functions CRANK and CAM with &lt;EM&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;/EM&gt; of the read status and read error status functions. Bottom line, CRANK does not get sync.&lt;/P&gt;&lt;P&gt;Oh yea, as I said at the start, have tried over 100 different combinations of parameter settings in the function and engine setup.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm kind of out of ideas for things to try. I know that TPU stuff can be tricky, but it shouldn't be this hard. The CRANK function is designed to look at a poor input signal and get/maintain sync.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current list of probable suspects is:&lt;/P&gt;&lt;P&gt;1. Evil spirits.&lt;/P&gt;&lt;P&gt;2. Angle mode hardware is actually broken inside the chip (I think that this is probably slightly less probable than the evil spirits theory!).&lt;/P&gt;&lt;P&gt;3. There is something that needs to set/inited prior to eTPU start that I know nothing of. Possibly something related to the angle clock? The manuals nor the demo certainly don't suggest what it could be.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2013 16:27:09 GMT</pubDate>
    <dc:creator>Nivek</dc:creator>
    <dc:date>2013-11-21T16:27:09Z</dc:date>
    <item>
      <title>eTPU2 CRANK and CAM function problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292307#M286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'll state my problem on top and describe the setup below.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To start with I should say that I am new to eTPU/eTPU2 usage. I do have fairly extensive experience with TPU/TPU3. I have written several fairly complex TPU3 functions so have reasonably good idea how the channel hardware works.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a xPC56xxMB EVAL board with the xPC 564AADPT324S mini-module (MPC5644A, 324 pin), I am unable to make the CRANK (etpu set2) function work. It acts as if it just does not see the input signal. I have tried literally over 100 different configs, channel and engine setup, to no avail. All other functions work normally.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Codewarrior 10.4 default 5644 project with no operating system. Main program runs fine with eMIOS200, eQADC, eSCI, Flexcan modules all working.&lt;/P&gt;&lt;P&gt;Using the eTPU Graphical Configuration Tool (gct) for eTPU config and init.&lt;/P&gt;&lt;P&gt;All pads properly set in SIU.&lt;/P&gt;&lt;P&gt;ToothGen function works. Verified by oscilloscope. ToothGen crank jumpered to CRANK (channel 0) on the dev board. ToothGen cam jumpered to CAM on dev board.&lt;/P&gt;&lt;P&gt;PWM function on ch 30 works. Verified by scope.&lt;/P&gt;&lt;P&gt;To check and make sure that ch 0 actually could be configured as an input, assigned the FPM function to ch 0 and jumpered the cam signal to it. Worked and returns the correct frequency.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; NOTE:&lt;/STRONG&gt; FPM would not work until I turned off angle mode. Probably normal, I just don't know.&lt;/P&gt;&lt;P&gt;Have read, thoroughly, every AN, I won't list them here, there are too many. Even watched the youtube video.&lt;/P&gt;&lt;P&gt;Studied the eTPU section of&amp;nbsp; MPC5644ARM. Studied ETPURM and ETPURMAD.&lt;/P&gt;&lt;P&gt;Copied the gct config from AN3769SW for engine and function setup, modifying the TCR1 prescaler to get as close to the demo TCR1 freq as possible.&lt;/P&gt;&lt;P&gt;All init functions return no error, I even went into the source of the fs_etpu_init() and fs_etpu_app_eng_pos_int() functions to bring out all of the internal error codes. Not too surprising, as the eTPU engine does appear to init properly, all other functions work properly.&lt;/P&gt;&lt;P&gt;Checked, manually, all of the config values created by the gct. All seem correct.&lt;/P&gt;&lt;P&gt;In my main app, removed int for eMIOS200, eQADC, Flexcan, and manually disabled each module in it's MCR.&lt;/P&gt;&lt;P&gt;In my main app, I tried inititing only sysclk, SIU, and eTPU only. Etpu init is by running my_system_etpu_init() followed by my_system_etpu_start() (my_system_etpu_start() starts the Global time base).&lt;/P&gt;&lt;P&gt;Have queried the engine position functions CRANK and CAM with &lt;EM&gt;&lt;STRONG&gt;all&lt;/STRONG&gt;&lt;/EM&gt; of the read status and read error status functions. Bottom line, CRANK does not get sync.&lt;/P&gt;&lt;P&gt;Oh yea, as I said at the start, have tried over 100 different combinations of parameter settings in the function and engine setup.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm kind of out of ideas for things to try. I know that TPU stuff can be tricky, but it shouldn't be this hard. The CRANK function is designed to look at a poor input signal and get/maintain sync.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current list of probable suspects is:&lt;/P&gt;&lt;P&gt;1. Evil spirits.&lt;/P&gt;&lt;P&gt;2. Angle mode hardware is actually broken inside the chip (I think that this is probably slightly less probable than the evil spirits theory!).&lt;/P&gt;&lt;P&gt;3. There is something that needs to set/inited prior to eTPU start that I know nothing of. Possibly something related to the angle clock? The manuals nor the demo certainly don't suggest what it could be.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 16:27:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292307#M286</guid>
      <dc:creator>Nivek</dc:creator>
      <dc:date>2013-11-21T16:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: eTPU2 CRANK and CAM function problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292308#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;EM&gt;ToothGen crank jumpered to CRANK (channel 0) on the dev board.&lt;/EM&gt;&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be the issue. The Crank signal should be connected to TCRCLK input. Alternatively, the Crank signal could be connected to channel 1 or channel 2 is specifically set in TBCR.AM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Milan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 12:54:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292308#M287</guid>
      <dc:creator>MilanBrejl</dc:creator>
      <dc:date>2013-11-27T12:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: eTPU2 CRANK and CAM function problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292309#M288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Milan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, your suggestion was correct. My code runs perfectly now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question. Has there been a change in the microcode of the engine position function? Maybe the addition of angle clock functionality to channel 1 and 2 in the eTPU2 caused a re-write of the microcode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason that I had the ToothGen crank output connected to the channel 0 pin is because that is what the documentation all says to do. If there has been a change, perhaps Freescale would like to update their documentation. So far I have found the instructions to connect the ToothGen crank signal to channel 0 input pin in several places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AN3801-ToothGen, pg 14, paragraph 2, states: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"The tooth generator output for the CRANK signal must be connected to the pin assigned the eTPU channel&lt;/LI&gt;&lt;LI&gt;running the CRANK function. Also, the tooth generator output for the CAM signal must be connected to&lt;/LI&gt;&lt;LI&gt;the pin assigned the eTPU channel running the CAM function. The channel assignments are shown in the&lt;/LI&gt;&lt;LI&gt;following table."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The table mentioned above has CRANK ch 0, ToothGen crank ch 1, CAM ch 14, ToothGen cam ch15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AN3769-CRANK has the exact same paragraph and table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AN3769SW-Freemaster demo, has the same configuration. There was a youtube video that visually showed the ToothGen crank output jumpered to channel 0 pin on the dev board. It is worth noting that this video has been removed from youtube in the last couple of days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help, I might never have found the problem without your assistance.&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 16:34:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/eTPU2-CRANK-and-CAM-function-problem/m-p/292309#M288</guid>
      <dc:creator>Nivek</dc:creator>
      <dc:date>2013-11-29T16:34:26Z</dc:date>
    </item>
  </channel>
</rss>

