<?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: SH8 timer channel value registers in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156831#M9073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;The QC8 has&amp;nbsp;&amp;nbsp;a TPMV2 and the SH8 has got the TPMV3.&lt;/DIV&gt;&lt;DIV&gt;I have not studied your code to find what the reason is, but I believe that the V2/V3 difference is the reason.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Ake&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2008 15:35:51 GMT</pubDate>
    <dc:creator>Ake</dc:creator>
    <dc:date>2008-05-19T15:35:51Z</dc:date>
    <item>
      <title>SH8 timer channel value registers</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156830#M9072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am trying to get the SH8 to do PWM.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In SH8 the following does not change the timer value registers.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ldhx&amp;nbsp;&amp;nbsp;&amp;nbsp; #a_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; any 16 bit value&lt;/DIV&gt;&lt;DIV&gt;sthx&amp;nbsp;&amp;nbsp; $0029&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; TPM1C1VH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or any other timer channel value register.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Writing to TPM1MODH does write ok. I get timer overflow interupts ok for period but can't set pulse width since I can't get a value other than 0 in TPM1C1VH.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However if I do the same in QG8 it does work eg;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ldhx&amp;nbsp;&amp;nbsp;&amp;nbsp; #a_number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; any 16 bit value&lt;/DIV&gt;&lt;DIV&gt;sthx&amp;nbsp;&amp;nbsp; $0049&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; TPMC1VH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or any other timer channel value register&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using WinIDE, ProgHCS08 and ICDHCS08 debugger, Cyclone Pro as interface.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Testing the device as standalone circuit or via ICDHCS08 shows the same result.&lt;/DIV&gt;&lt;DIV&gt;I've tried a couple of SH8 chips.&lt;/DIV&gt;&lt;DIV&gt;With any luck this will be simple and something I'm overlooking. Perhaps a memory mapping problem??&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rob&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 11:05:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156830#M9072</guid>
      <dc:creator>RobG</dc:creator>
      <dc:date>2008-05-19T11:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: SH8 timer channel value registers</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156831#M9073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;The QC8 has&amp;nbsp;&amp;nbsp;a TPMV2 and the SH8 has got the TPMV3.&lt;/DIV&gt;&lt;DIV&gt;I have not studied your code to find what the reason is, but I believe that the V2/V3 difference is the reason.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Ake&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 15:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156831#M9073</guid>
      <dc:creator>Ake</dc:creator>
      <dc:date>2008-05-19T15:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: SH8 timer channel value registers</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156832#M9074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Found it! Yes it is due to differences between TPMV2 and TPMV3. In TPMV3&amp;nbsp;writes to the channel value registers are not recognised unless the channel has been configured for output compare first. I was attempting to write the pulse width value to the channel value register before configuring the channel as output compare. That works ok in TPMV2 but not TPMV3.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rob&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2008 20:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156832#M9074</guid>
      <dc:creator>RobG</dc:creator>
      <dc:date>2008-05-19T20:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: SH8 timer channel value registers</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156833#M9075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Actually, on the TPMV3 (as opposed to the TPMV2), you need to be careful that you do not immediately write to the TPMxCnSC register after updating the value in TPMxCnVH:TPMxCnVL.&amp;nbsp; The channel value registers are not immediately loaded in the TPMV3 (in OC or PWM mode), but are rather held in a coherency buffer until the next TPM clock tick.&amp;nbsp; So even if the channel had previously been configured as an Output Compare (or PWM for that matter), the culprit may have been a subsequent access to the corresponding status and control register.&amp;nbsp; Although&amp;nbsp;it was OK to&amp;nbsp;update the channel value (TPMxCnVH:TPMxCnVL) and then clear the interrupt flag (within TPMxCnSC)&amp;nbsp;on the TPMV2, that register update sequence may prevent the channel value from actually being updated on TPM3.&amp;nbsp; Here is description from Freescale as provided within some of the 9S08AC manuals and application notes:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="TimesNewRomanPSMT"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="TimesNewRomanPSMT"&gt;&lt;FONT color="#3300FF"&gt;In output compare or PWM mode, writing to TPMxCnSC (after writing to the channel value registers, TPMxCnVH:TPMxCnVL, but before they are updated) cancels the write to TPMxCnVH:TPMxCnVL and leaves the register values unchanged.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P align="left"&gt;&lt;FONT color="#3300FF"&gt;This is particularly relevant for the AC60 because, depending upon the configuration of CLKS and the selected mode, there could be a considerable time before registers TPMxCnVH:TPMxCnVL are updated.&amp;nbsp; It is, therefore, important to ensure TPMxCnSC is not written during this time unless you want to cancel a previous write to the channel value registers.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#3300FF"&gt;As a result of these differences in the latching mechanism, you may have to initialise the timer registers in a different order than before to allow for this.&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jul 2008 02:26:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/SH8-timer-channel-value-registers/m-p/156833#M9075</guid>
      <dc:creator>MplsMan</dc:creator>
      <dc:date>2008-07-26T02:26:31Z</dc:date>
    </item>
  </channel>
</rss>

