<?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のトピックvector table in FLASH (MCF5282)</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159370#M4925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a reason why in all examples I have seen, the vector table is copied&lt;BR /&gt;into RAM (either internal SRAM or external SDRAM)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can’t we leave the vector table in internal flash (CFM)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If so, what are the pros and cons of having the vector&lt;BR /&gt;table in RAM or ROM?&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SVC&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 23:21:27 GMT</pubDate>
    <dc:creator>SVC1</dc:creator>
    <dc:date>2008-05-27T23:21:27Z</dc:date>
    <item>
      <title>vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159370#M4925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there a reason why in all examples I have seen, the vector table is copied&lt;BR /&gt;into RAM (either internal SRAM or external SDRAM)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can’t we leave the vector table in internal flash (CFM)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If so, what are the pros and cons of having the vector&lt;BR /&gt;table in RAM or ROM?&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;SVC&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 23:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159370#M4925</guid>
      <dc:creator>SVC1</dc:creator>
      <dc:date>2008-05-27T23:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159371#M4926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I like it ram, so when I call a routine to initialize a module it can put it's vector in. Also, I sometimes use a different handler.&lt;BR /&gt;And, if you are re-burning flash and interrupt could cause a crash.&lt;BR /&gt;Having said that, I know of no reason it will not work in flash, you will just have adjust the start up code.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 23:58:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159371#M4926</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-05-27T23:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159372#M4927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Thanks Jim, but I don't understand your first comment.&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;I like it ram, so when I call a routine to initialize a module it can put it's vector in. Also, I sometimes use a different handler.&lt;/EM&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;Can you please elaborate a little bit more?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Simon&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 05:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159372#M4927</guid>
      <dc:creator>SVC1</dc:creator>
      <dc:date>2008-05-28T05:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159373#M4928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Sure, I have code that say initializes a DMA Timer channel. The initialization code sest up the module and puts the vector in the interrupt table, upon initialization. If I don't use that module, then the vector stays pointed to the default handler.&lt;BR /&gt;It' just a nice to encapsulate code so that when you use it no worries about the vector. I pass in a pointer to a "user" function that will actually handle the interrupt, again so I don't have to think about how you acknowledge it. Kinda of a little framework so once you figure things out you don't need to think about it again.&lt;BR /&gt;When you use that code again in a different program, you don't have to modify the exception table.&lt;BR /&gt;&lt;BR /&gt;Some times you may wish to change to interrupt handlers to a different routine, so you can just change where the vectors points.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 06:20:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159373#M4928</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-05-28T06:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159374#M4929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hi SVC,&lt;BR /&gt;&lt;BR /&gt;I believe the pros have not been mentioned. I can think of one advantage only: vector table in flash saves you about 1KB of RAM, which can be significant in some applications.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;- scifi&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 15:01:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159374#M4929</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-05-28T15:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159375#M4930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Having the vector table in Flash works fine, but Jim is correct to say that copying it to RAM is more flexible.&lt;BR /&gt;&lt;BR /&gt;However, one other advantage of leaving the table in Flash : a rogue program cannot corrupt the vector table by scribbling over it.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 16:43:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159375#M4930</guid>
      <dc:creator>SimonMarsden_de</dc:creator>
      <dc:date>2008-05-28T16:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159376#M4931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;However, one other advantage of leaving the table in Flash : a rogue program cannot corrupt the vector table by scribbling over it.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;That is a good point - however the rouge program will then be scribbling on your variables. You can say one is better/worse that the other, but that is a tough call. A bug is a bug, and will bite you in the end. A least if you scribble the vector table, good chance your program will crash sooner (like while still in development). This might sound like an odd thing to say, but crashing sooner in an obvious way is better than later (after 10,000 units have shipped) in some tricky way that is hard to notice.&lt;BR /&gt;&lt;BR /&gt;One thing I do is set it up so exceptions will print on the uart, and then leave it hooked up to a terminal program during development. I have already found some bugs that way that I might have never noticed.&lt;BR /&gt;Like spurious interrupts - it was harmless, but still undesired (I was resetting up a timer, and I cleared the pending bit after the interrupt controller had already seen the interrupt, then when the iack cycle comes the interrupt has already been cleared, so the module does not acknowledge it).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2008 22:39:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159376#M4931</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-05-28T22:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: vector table in FLASH (MCF5282)</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159377#M4932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;On the same topic, let's say I opt for keeping the vector table in flash, and would like my application to be at address 0x8000, how do I set up the VBR to this address (since the lower 20 bits are not implemented)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Simon&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jun 2008 22:39:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/vector-table-in-FLASH-MCF5282/m-p/159377#M4932</guid>
      <dc:creator>SVC1</dc:creator>
      <dc:date>2008-06-09T22:39:24Z</dc:date>
    </item>
  </channel>
</rss>

