<?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: PIT in MC9S12XEP100 in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PIT-in-MC9S12XEP100/m-p/802919#M15734</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Harshitha C B,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the reference manual, the chapter 17.4.1 Timer could be helpful.&lt;/P&gt;&lt;P&gt;I attached the below excerpt from the RM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"As soon as a micro time base is selected for an enabled timer channel, the corresponding micro timer modulus down-counter will load its start value as specified in the PITMTLD0 or PITMTLD1 register and will start down-counting.&lt;/P&gt;&lt;P&gt;Whenever the micro timer down-counter has counted to zero the PITMTLD register is reloaded and the connected 16-bit modulus down-counters count one cycle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever a 16-bit timer counter and the connected 8-bit micro timer counter have counted to zero, the&lt;BR /&gt;PITLD register is reloaded and the corresponding time-out flag PTF in the PIT time-out flag (PITTF)&amp;nbsp;register is set,&lt;/P&gt;&lt;P&gt;as shown in Figure 17-28.&lt;/P&gt;&lt;P&gt;The time-out period is a function of the timer load (PITLD) and micro timer load (PITMTLD) registers and the bus clock fBUS:&lt;/P&gt;&lt;P&gt;time-out period = (PITMTLD + 1) * (PITLD + 1) / fBUS."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2018 12:50:08 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2018-07-13T12:50:08Z</dc:date>
    <item>
      <title>PIT in MC9S12XEP100</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PIT-in-MC9S12XEP100/m-p/802918#M15733</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 implementing a timer module for scheduler.&lt;/P&gt;&lt;P&gt;I found below code in the&amp;nbsp;MC9S12XEP100 user manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;CLR PITCFLMT &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; disable PIT
MOVB #$01,PITCE &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;&amp;nbsp;; enable timer channel 0
CLR PITMUX &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; ch0 connected to micro timer 0
MOVB #$63,PITMTLD0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; micro time base 0 equals 100 clock cycles
MOVW #$0004,PITLD0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; time base 0 eq. 5 micro time bases 0 =5*100 = 500
MOVB #$01,PITINTE &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;; enable interupt channel 0
MOVB #$80,PITCFLMT &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;; enable PIT
CLI&amp;nbsp;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My doubt is what is the function of &lt;STRONG&gt;"&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;PITMTLD0"&lt;/STRONG&gt; and &lt;STRONG&gt;"PITLD0"&lt;/STRONG&gt; these registers?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do they act as counters?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;Can u explain me in-detail&lt;/SPAN&gt;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Harshitha C B&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 05:15:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PIT-in-MC9S12XEP100/m-p/802918#M15733</guid>
      <dc:creator>harshitha_chiga</dc:creator>
      <dc:date>2018-07-12T05:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: PIT in MC9S12XEP100</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PIT-in-MC9S12XEP100/m-p/802919#M15734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Harshitha C B,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the reference manual, the chapter 17.4.1 Timer could be helpful.&lt;/P&gt;&lt;P&gt;I attached the below excerpt from the RM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"As soon as a micro time base is selected for an enabled timer channel, the corresponding micro timer modulus down-counter will load its start value as specified in the PITMTLD0 or PITMTLD1 register and will start down-counting.&lt;/P&gt;&lt;P&gt;Whenever the micro timer down-counter has counted to zero the PITMTLD register is reloaded and the connected 16-bit modulus down-counters count one cycle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever a 16-bit timer counter and the connected 8-bit micro timer counter have counted to zero, the&lt;BR /&gt;PITLD register is reloaded and the corresponding time-out flag PTF in the PIT time-out flag (PITTF)&amp;nbsp;register is set,&lt;/P&gt;&lt;P&gt;as shown in Figure 17-28.&lt;/P&gt;&lt;P&gt;The time-out period is a function of the timer load (PITLD) and micro timer load (PITMTLD) registers and the bus clock fBUS:&lt;/P&gt;&lt;P&gt;time-out period = (PITMTLD + 1) * (PITLD + 1) / fBUS."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2018 12:50:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/PIT-in-MC9S12XEP100/m-p/802919#M15734</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2018-07-13T12:50:08Z</dc:date>
    </item>
  </channel>
</rss>

