<?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>CodeWarrior Development ToolsのトピックRe: 9S12x Interrupt vector address in .prm file or in code?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12x-Interrupt-vector-address-in-prm-file-or-in-code/m-p/304462#M701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi John. !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the interrupt vector address is correct in your code.&lt;/P&gt;&lt;P&gt;please perform interrupt per attached technical note.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==================================================&lt;/P&gt;&lt;P&gt;this answer is for you. if it helps, please click on "correct answer" button. thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;ZhangJun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jun 2014 07:20:24 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2014-06-03T07:20:24Z</dc:date>
    <item>
      <title>9S12x Interrupt vector address in .prm file or in code?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12x-Interrupt-vector-address-in-prm-file-or-in-code/m-p/304461#M700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've done several projects on the 9S12XDP512 and in each case I've used the .prm file to specify the names of the interrupt handling functions. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;/* use these definitions in plane of the vector table ('vectors') above */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;//VECTOR 0 Entry&amp;nbsp; /* reset vector: this is the default entry point for an Assembly application. */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;//INIT Entry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* for assembly applications: that this is as well the initialization entry point */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;VECTOR ADDRESS 0xFF78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT1_ISR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;VECTOR ADDRESS 0xFF7A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PIT0_ISR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier; color: #0000ff;"&gt;VECTOR ADDRESS 0xFFD6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COM1Interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;VECTOR ADDRESS 0xFFD4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COM2Interrupt&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is all based on the original example code from the Softec Development board I started with.&lt;/P&gt;&lt;P&gt;The linker fills in the rest of the table with FFFF so a spurious interrupt should reset the application since the entry at that RESET vector is 0xC000.&lt;/P&gt;&lt;P&gt;Is there a better way to do this or should I care?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the timer.c file I have:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;#pragma CODE_SEG __NEAR_SEG NON_BANKED&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;interrupt void PIT0_ISR(void) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TickCount++;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;PITTF = 0x01;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;}&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;#pragma CODE_SEG DEFAULT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to access the variable TickCount I disable interrupts since TickCount is a 16 bit variable and could change between reading it and clearing it.&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;// disable timer interrupts&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PITINTE &amp;amp;= DELAY_TIMER_DISABLE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Update local copy.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; t_Delay = TickCount;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TickCount = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // re-enable timer interrupts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PITINTE |= DELAY_TIMER_ENABLE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments on the above.&amp;nbsp; Is there anything unique in the 9S12 family that I'm missing here?&amp;nbsp; Specifically when I see the comments in the .prm file about OSEK etc.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;ENTRIES /* keep the following unreferenced variables */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* OSEK: always allocate the vector table and all dependent objects */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: courier new,courier;"&gt;END&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 19:02:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12x-Interrupt-vector-address-in-prm-file-or-in-code/m-p/304461#M700</guid>
      <dc:creator>jcdammeyer</dc:creator>
      <dc:date>2014-05-23T19:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: 9S12x Interrupt vector address in .prm file or in code?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12x-Interrupt-vector-address-in-prm-file-or-in-code/m-p/304462#M701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi John. !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the interrupt vector address is correct in your code.&lt;/P&gt;&lt;P&gt;please perform interrupt per attached technical note.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==================================================&lt;/P&gt;&lt;P&gt;this answer is for you. if it helps, please click on "correct answer" button. thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;ZhangJun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2014 07:20:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/9S12x-Interrupt-vector-address-in-prm-file-or-in-code/m-p/304462#M701</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-06-03T07:20:24Z</dc:date>
    </item>
  </channel>
</rss>

