<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックRe: How to activate a 1 second PIT?</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129216#M663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The code generated by "ColdFire Init" leaves the interrupt mask in the Status Register (SR) set to 0x7 - i.e. all interrupts except level 7 masked. This is done so that you can write any further initialisation code before finally enabling interrupts.&lt;BR /&gt;&lt;BR /&gt;Maybe this is the problem? If so, you need to lower the interrupt fence to 0 to allow all interrupts. In assembler this would be:&lt;BR /&gt;&lt;BR /&gt;move.l #$00002000,d0&lt;BR /&gt;move.w d0,SR&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or in C (depending on the compiler) something like:&lt;BR /&gt;&lt;BR /&gt;asm {&lt;BR /&gt;move.l #0x00002000,d0&lt;BR /&gt;move.w d0,SR&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Try adding this to the end of your initialisation code.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Sep 2006 17:02:40 GMT</pubDate>
    <dc:creator>SimonMarsden_de</dc:creator>
    <dc:date>2006-09-06T17:02:40Z</dc:date>
    <item>
      <title>How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129211#M658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am too stupid to program a working PIT which calls every second a interrupt service routine on a 52233DEMO board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anybody explain me the code to do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Volker&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 11:44:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129211#M658</guid>
      <dc:creator>vokuit00</dc:creator>
      <dc:date>2006-09-05T11:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129212#M659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;you have to remember to set the ipl for the interrupt, and set the handler.&lt;BR /&gt;this is some code i used on my 5213ev board to setup ~100Hz interrupt:&lt;BR /&gt;&lt;BR /&gt; MCF_INTC_ICR55 = 0&lt;BR /&gt; | MCF_INTC_ICR_IP(2)&lt;BR /&gt; | MCF_INTC_ICR_IL(2); //set priorities&lt;BR /&gt; MCF_INTC_IMRH &amp;amp;= ~ MCF_INTC_IMRH_MASK55;&lt;BR /&gt;&lt;BR /&gt; MCF_PIT0_PMR = 24; //set modulus to 24 (about 100Hz frequency-&amp;gt; = 80MHz/(32768*24))&lt;BR /&gt; MCF_PIT0_PCSR = 0&lt;BR /&gt; | MCF_PIT_PCSR_PRE(0xA)&lt;BR /&gt; | MCF_PIT_PCSR_PIE&lt;BR /&gt; | MCF_PIT_PCSR_EN&lt;BR /&gt; | MCF_PIT_PCSR_RLD; //enable PIT (32768 prescaler, interrupts)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and i manually set the sr in the vectors.s file&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 11:52:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129212#M659</guid>
      <dc:creator>airswit</dc:creator>
      <dc:date>2006-09-05T11:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129213#M660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I tried it with:&lt;BR /&gt;&lt;BR /&gt;MCF_INTC_ICR55(1) = 0&lt;BR /&gt; | MCF_INTC_ICR_IP(2)&lt;BR /&gt; | MCF_INTC_ICR_IL(2); //set priorities&lt;BR /&gt; MCF_INTC_IMRH(1) &amp;amp;= ~ MCF_INTC_IMRH_MASK55;&lt;BR /&gt;&lt;BR /&gt; MCF_PIT0_PMR = 24; //set modulus to 24 (about 100Hz frequency-&amp;gt; = 80MHz/(32768*24))&lt;BR /&gt; MCF_PIT0_PCSR = 0&lt;BR /&gt; | MCF_PIT_PCSR_PRE(0xA)&lt;BR /&gt; | MCF_PIT_PCSR_PIE&lt;BR /&gt; | MCF_PIT_PCSR_EN&lt;BR /&gt; | MCF_PIT_PCSR_RLD; //enable PIT (32768 prescaler, interrupts)&lt;BR /&gt;&lt;BR /&gt;but it doesn_t work. The isr is set manually in the vectors.s.&lt;BR /&gt;&lt;BR /&gt;No one there using a 52233DEMO-Board and can make an example?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 17:34:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129213#M660</guid>
      <dc:creator>vokuit00</dc:creator>
      <dc:date>2006-09-05T17:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129214#M661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;this is a silly question, but do you have interrupts enabled? and are any other interrupts higher priority and thus interrupting all the time?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2006 20:33:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129214#M661</guid>
      <dc:creator>airswit</dc:creator>
      <dc:date>2006-09-05T20:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129215#M662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;IRQs are enabled, but the only IRQ i can trigger is IRQ7 from a switch SW2 on the demo board.&lt;BR /&gt;&lt;BR /&gt;I tried IRQs for PITs, RTC and DMA Timer, but i am not be able to get success.&lt;BR /&gt;&lt;BR /&gt;I tried it with the help of the software "Coldfire Init", but also without success.&lt;BR /&gt;&lt;BR /&gt;So a CodeWarrior-Example for a 52233 will be very helpful.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2006 11:27:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129215#M662</guid>
      <dc:creator>vokuit00</dc:creator>
      <dc:date>2006-09-06T11:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129216#M663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The code generated by "ColdFire Init" leaves the interrupt mask in the Status Register (SR) set to 0x7 - i.e. all interrupts except level 7 masked. This is done so that you can write any further initialisation code before finally enabling interrupts.&lt;BR /&gt;&lt;BR /&gt;Maybe this is the problem? If so, you need to lower the interrupt fence to 0 to allow all interrupts. In assembler this would be:&lt;BR /&gt;&lt;BR /&gt;move.l #$00002000,d0&lt;BR /&gt;move.w d0,SR&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;or in C (depending on the compiler) something like:&lt;BR /&gt;&lt;BR /&gt;asm {&lt;BR /&gt;move.l #0x00002000,d0&lt;BR /&gt;move.w d0,SR&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Try adding this to the end of your initialisation code.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Sep 2006 17:02:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129216#M663</guid>
      <dc:creator>SimonMarsden_de</dc:creator>
      <dc:date>2006-09-06T17:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129217#M664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi Simon,&lt;BR /&gt;&lt;BR /&gt;many thanks for your helpful answer. That was the problem. &lt;SPAN&gt;&lt;IMG alt="Insert Smilies" border="0" height="22" src="http://forums.freescale.com/../../i/global/post_emoticons.gif" width="22" /&gt;&lt;BR /&gt;&lt;BR /&gt;And the same setting for the SR-Register was in the vector.s-file when usind CodeWarrior-Projects, so i change it there and now it works.&lt;BR /&gt;&lt;BR /&gt;Greetings&lt;BR /&gt;&lt;BR /&gt;Volker&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 14:02:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129217#M664</guid>
      <dc:creator>vokuit00</dc:creator>
      <dc:date>2006-09-07T14:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to activate a 1 second PIT?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129218#M665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You're welcome.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Simon&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Sep 2006 16:19:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-to-activate-a-1-second-PIT/m-p/129218#M665</guid>
      <dc:creator>SimonMarsden_de</dc:creator>
      <dc:date>2006-09-07T16:19:35Z</dc:date>
    </item>
  </channel>
</rss>

