<?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>S12 / MagniV MicrocontrollersのトピックRe: wrong value loaded</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209714#M8669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it one time failure, or indeed it is always the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since it seems&amp;nbsp;you are using S12XE, which has emulated EEPROM,&amp;nbsp;where&amp;nbsp;writes to EEE buffer RAM are immediately granted instead of certain EEPROM programming sequence, then what if some interrupt writes to EEPROM&amp;nbsp;by mistake or intentionally? Please make sure that no interrupt happened after GLDD but before debugger reads from EEPROM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What if it's debugger's bug?&amp;nbsp;Try&amp;nbsp;checking if data at logical 0x0B20'L is the same. I would also try to make two copies in RAM of the same&amp;nbsp;data using CPU. One copy using non-G instructions from EEPROM page, and another copy using G-instructions. Compating copies with what debugger reads directly from EEPROM should tell something&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 May 2011 12:37:25 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2011-05-28T12:37:25Z</dc:date>
    <item>
      <title>wrong value loaded</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209711#M8666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the attached screen picture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the GLDD instruction was executed, the wrong value, 0x0008, was loaded. The expected value is 0x001d. Any idea why this might happen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I executed this code one instruction at a time using assembly step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 05:35:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209711#M8666</guid>
      <dc:creator>rlw</dc:creator>
      <dc:date>2011-05-26T05:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: wrong value loaded</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209712#M8667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it simulator or real hardware? If real, then 1) it may be wrong flash/EEPROM/DFLASH clock divider setting, leading to incomplete programming of bits, which may cause&amp;nbsp;random reads. 2) debugger may be caching contents of NV memory. You programmed one value and CPU reads it properly, but debugger&amp;nbsp;is still showing old contents of NV memory. Try going to Multilink -&amp;gt; Debug Memory Map menu and checking "refresh when halting" chceckbox for particular flash/EEPROM/DFLASH memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2011 14:36:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209712#M8667</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2011-05-26T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: wrong value loaded</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209713#M8668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Real hardware. I have confirmed flash clock setting conforms with AN3743:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Uncomment the FCLK_DIV value according to the oscillator crystal.&lt;BR /&gt;//These values are chosen from the MC9S12XE100 datasheet.&lt;BR /&gt;//#define FCLK_DIV 0x1 // Flash clock divider for 2MHz crystal&lt;BR /&gt;#define FCLK_DIV 0x3 // Flash clock divider for 4MHz crystal&lt;BR /&gt;//#define FCLK_DIV 0x7 // Flash clock divider for 8MHz crystal&lt;BR /&gt;//#define FCLK_DIV 0x9 // Flash clock divider for 10MHz crystal&lt;BR /&gt;//#define FCLK_DIV 0x18 // Flash clock divider for 26MHz crystal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using an 8MHz crystal, so are using 0x7 as the value. (And commenting out the line for 4MHz crystal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I have confirmed that the "refresh when halting" checkbox is checked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2011 06:20:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209713#M8668</guid>
      <dc:creator>rlw</dc:creator>
      <dc:date>2011-05-28T06:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: wrong value loaded</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209714#M8669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it one time failure, or indeed it is always the same?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since it seems&amp;nbsp;you are using S12XE, which has emulated EEPROM,&amp;nbsp;where&amp;nbsp;writes to EEE buffer RAM are immediately granted instead of certain EEPROM programming sequence, then what if some interrupt writes to EEPROM&amp;nbsp;by mistake or intentionally? Please make sure that no interrupt happened after GLDD but before debugger reads from EEPROM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What if it's debugger's bug?&amp;nbsp;Try&amp;nbsp;checking if data at logical 0x0B20'L is the same. I would also try to make two copies in RAM of the same&amp;nbsp;data using CPU. One copy using non-G instructions from EEPROM page, and another copy using G-instructions. Compating copies with what debugger reads directly from EEPROM should tell something&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 May 2011 12:37:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209714#M8669</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2011-05-28T12:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: wrong value loaded</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209715#M8670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is consistant, though the data values vary (as expected).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, we are treating this as a debugger issue and are using alternative means to debug (sending bytes out a spare SPI port. Not optimal, since it requires modifying the code)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will follow up as we are able to fit in your suggested experiments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2011 23:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/wrong-value-loaded/m-p/209715#M8670</guid>
      <dc:creator>rlw</dc:creator>
      <dc:date>2011-05-31T23:32:22Z</dc:date>
    </item>
  </channel>
</rss>

