<?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: MCF5213 trouble getting started in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138838#M2106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yes, || is a careless error. I have made this work with the set_handle function and not touching the assembly file.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Dec 2006 12:58:38 GMT</pubDate>
    <dc:creator>josh_outerspace</dc:creator>
    <dc:date>2006-12-07T12:58:38Z</dc:date>
    <item>
      <title>MCF5213 trouble getting started</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138835#M2103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the M5213EVB with codewarrior and the C stationary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting a problem when trying to use interrupts. Here is what I am doing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Make interrupt function preceded with __interrupt__ keyword. It is a PIT interrupt, it looks like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__interrupt__ void my_pit0_irq(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{//vector 64+55=119, source =55&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_PIT0_PCSR = (108)||(13)||1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_PIT0_PMR = 0xffff;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_GPIO_PORTAN ^= 0xff; //flip last 4 bits&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. In main function, I add these lines of code for interrupt:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_PIT0_PCSR = (68)||(13)||1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//2^10 prescaler, enable irq, enable module&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_INTC_ICR55 = (33)||(3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MCF_INTC_IMRH = ~(123); //enable irq 55&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. In vectors.s I change this-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;vector119: .long asm_exception_handler&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to this-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;vector119: .long my_pit0_irq&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason I changed vector 119 is because the pit0 irq is number 55 and 55+64=119.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I compile this, I get error!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;error- unknown identifier in vectors.s!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The identifier is the EXACT SAME as my interrupt function!!!!! How can this happen? I am very frustrated with freescale right now. I have used many products and have never had such an issue getting an interrupt to work!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Dec 2006 17:53:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138835#M2103</guid>
      <dc:creator>josh_outerspace</dc:creator>
      <dc:date>2006-12-02T17:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 trouble getting started</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138836#M2104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The file 'vectors.s' is an assembler file, so it knows nothing about the interrupt handler in your C code.&lt;BR /&gt;&lt;BR /&gt;You need to add the following declaration to the start of vectors.s:&lt;BR /&gt;&lt;BR /&gt;.extern _my_pit0_irq&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note that there is a leading underscore '_' character there. This is because the C compiler always adds an underscore to the name of any C function; to get the assembler to match, you need to add the underscore explicitly.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 20:55:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138836#M2104</guid>
      <dc:creator>SimonMarsden_de</dc:creator>
      <dc:date>2006-12-04T20:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 trouble getting started</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138837#M2105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;it also seems as if you may be writing your code incorrectly. your 'ors' should be '|' rather than '||', as the latter is a boolean operation...be careful with those, as you are assigning a 1 to many things!&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 14:05:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138837#M2105</guid>
      <dc:creator>airswit</dc:creator>
      <dc:date>2006-12-06T14:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 trouble getting started</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138838#M2106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yes, || is a careless error. I have made this work with the set_handle function and not touching the assembly file.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 12:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-trouble-getting-started/m-p/138838#M2106</guid>
      <dc:creator>josh_outerspace</dc:creator>
      <dc:date>2006-12-07T12:58:38Z</dc:date>
    </item>
  </channel>
</rss>

