<?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: software loss when runnng on car in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721781#M14833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second bad controller was kept the original broken state,&lt;/P&gt;&lt;P&gt;and i am planning to do some basic checks to see whether there are physical damages,and then try to read the mcu memorys and registers to see the MMCECH state.&lt;/P&gt;&lt;P&gt;(the first broken ecu which is not working ,come back to work after i do reprogramming the ecu without any other trying...,so the second one is precious to keep the state )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 May 2018 06:56:10 GMT</pubDate>
    <dc:creator>wangjiajie</dc:creator>
    <dc:date>2018-05-26T06:56:10Z</dc:date>
    <item>
      <title>software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721777#M14829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hellow,everyone ,I meet a &amp;nbsp;emergency problem &amp;nbsp; when use MC9S12ZVCA192 chip,&lt;/P&gt;&lt;P&gt;the prombem did not occor in the lab ,but when on car it happened. and happend two times on road car &amp;nbsp;testing&lt;/P&gt;&lt;P&gt;after power off and on,the chip can't init &amp;nbsp; like the program itself is broken ,not running and have no functions .&lt;/P&gt;&lt;P&gt;first time the chip don't have bootloader and broken in 20000m,&lt;/P&gt;&lt;P&gt;second time the chip have bootloader and broken in 1000m,&lt;/P&gt;&lt;P&gt;I used BDM for the second time to access the BKGD pin and connected corretly ,and the memory data is mess.&lt;/P&gt;&lt;P&gt;Are there any Guide and Suggestions for this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 01:56:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721777#M14829</guid>
      <dc:creator>wangjiajie</dc:creator>
      <dc:date>2018-05-25T01:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721778#M14830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-userid="305404" data-username="wangjiajie" href="https://community.nxp.com/people/wangjiajie"&gt;&lt;STRONG style="color: #5e89c1;"&gt;&amp;nbsp;jiajie&lt;/STRONG&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wasn't your chip secured? I mean did you really connect over BDM correctly and saw real memory and not some pattern, which you would see reading secured MCU?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case&amp;nbsp;flash memory is OK, I guess you are using on-chip EEPROM, aren't you? S12ZVC&amp;nbsp;has following feature listed in datasheet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Triggers S12ZCPU machine exceptions upon detection of illegal memory accesses and&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;uncorrectable ECC errors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do you handle machine exception? Machine exception is triggered not only on RAM ECC failure or flash ECC failure, which should be fine for average application, but also on EEPROM ECC failure. It's possible but not easy to recover from machine exception, it's not like interrupt,&amp;nbsp;from which you could simply exit, it doesn't do any changes to stack pointer, return address is lost.&amp;nbsp;The problem is, if your MCU writes some data to EEPROM partially, for example due to power loss, or programming without erasing first, then reading it (which probably happens at each power on!) you are likely to&amp;nbsp;get machine exception... If you simply reboot on machine exception, then you will enter it again and again reading the same piece of EEPROM with broken ECC... IMO it's very important to handle machine exception properly, perhaps erase affected EEPROM or initialize it to some factory default settings, certainly something should be done for reliable operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 12:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721778#M14830</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2018-05-25T12:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721779#M14831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the mcu did not use the secure featrue, i used the freemaster tool to read the mcu data after i download the program by codeworrior "debug" button and do power off to reset the mcu.&lt;/P&gt;&lt;P&gt;i used eeprom function generated by processor expert to modify the eeprom and then i read back the data to check whether the data is writed success,&lt;/P&gt;&lt;P&gt;is this operation dangerous ? the power system in the car is not stable and there maybe some low power case when in road running test.&lt;/P&gt;&lt;P&gt;and how to handle machine exception? is this handle by the.processoer expert settings CPU-Events-OnMachineException ?&lt;/P&gt;&lt;P&gt;if the eeprom ecc triggers a machine exception ,how to solve the eeprom uncorrect data to prevent it from eeprom endless machine exception loop?&lt;/P&gt;&lt;P&gt;i also see.that there is a OnSRAM_ECCerrer events settings in the CompomentInspecter Cpu ,can this also help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 13:31:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721779#M14831</guid>
      <dc:creator>wangjiajie</dc:creator>
      <dc:date>2018-05-25T13:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721780#M14832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI style="background: white; margin: 0in 0in 10pt;"&gt;&lt;SPAN style="font-size: 10.5pt;"&gt;the mcu did not use the secure featrue, i used the freemaster tool to read the mcu data after i download the program by codeworrior "debug" button and do power off to reset the mcu.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P style="background: white; margin: 0in 0in 10pt;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;As I understand, you didn’t verify that program code is as you left it, you only verified that in Freemaster you see wrong data. This is expected if code stuck somewhere. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;It would be nice to verify if code&amp;nbsp;in flash isn’t modified. I don’t know yet how to do it with Eclipse version of CW, I’ll try latter and let you know after I figure the way how to do it without code reflashing. I hope you didn’t erase or reflash bad unit yet?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;i used eeprom function generated by processor expert to modify the eeprom and then i read back the data to check whether the data is writed success,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;Well, read to verify write was OK isn’t bad thing. But, if MCU is left powered from start to the end of EEPROM programming, the nothing wrong is likely to happen to EEPROM ECC. Problem may arise if MCU is powered down in the middle of EEPROM operation. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;and how to handle machine exception? is this handle by the.processoer expert settings CPU-Events-OnMachineException ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;(I’m not using Processor Expert. It always pays to deep study MCU features, and once done code generator like PE IMO just adds an extra level of complication, also the question arises how I’ll move to MCU, which is not supported by PE...) I tried creating project with PE, yes it’s OnMachineException. By default, in case ME handler is not defined, ME vector in PE generated vectors.c points to empty interrupt handler! This is obvious PE bug. Since ME doesn’t stack registers on exception, code will run into the weeds... By default it should be routine with for(;;) loop inside.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;if the eeprom ecc triggers a machine exception ,how to solve the eeprom uncorrect data to prevent it from eeprom endless machine exception loop?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: white; margin: 0in 0in 10pt 1in;"&gt;&lt;SPAN style="color: #51626f; font-size: 10.5pt;"&gt;i also see.that there is a OnSRAM_ECCerrer events settings in the CompomentInspecter Cpu ,can this also help?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;SRAM ECC has nothing to do with EEPROM ECC. Oh, if there would be registers, which pointed to address with bad ECC! It could be also some EEPROM check ECC command. Here it was discussed a bit:&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/453862?sr=stream&amp;amp;ru=214565"&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://community.nxp.com/thread/453862?sr=stream&amp;amp;ru=214565" target="test_blank"&gt;https://community.nxp.com/thread/453862?sr=stream&amp;amp;ru=214565&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;You could handle it like this: Prior to reading any EEPROM address, you should register read address A in some global variable. Once ME happens, check bits in MMCECH registers to verify if exception was caused by EEPROM ECC or something different. If it really was EEPROM, erase EEPROM sector at A. Then reset MCU using COP or any other means.&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin: 0in 0in 10pt;"&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 May 2018 05:19:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721780#M14832</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2018-05-26T05:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721781#M14833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The second bad controller was kept the original broken state,&lt;/P&gt;&lt;P&gt;and i am planning to do some basic checks to see whether there are physical damages,and then try to read the mcu memorys and registers to see the MMCECH state.&lt;/P&gt;&lt;P&gt;(the first broken ecu which is not working ,come back to work after i do reprogramming the ecu without any other trying...,so the second one is precious to keep the state )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 May 2018 06:56:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721781#M14833</guid>
      <dc:creator>wangjiajie</dc:creator>
      <dc:date>2018-05-26T06:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721782#M14834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;180528Updated :&lt;BR /&gt;I checked the MMCECH(0x13) AND MMCECL(0x32) AND it is EEPROM UNCORRECT ECC ERROR when CPU LOAD data&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="BAD_EEP_MMCECH_MMCECL.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/33171i2C9C0AA6D0A068EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="BAD_EEP_MMCECH_MMCECL.jpg" alt="BAD_EEP_MMCECH_MMCECL.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;SEE mmcech and mmcecl&lt;BR /&gt;And I am going to add machine exception handling and try to verify the method&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 07:41:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721782#M14834</guid>
      <dc:creator>wangjiajie</dc:creator>
      <dc:date>2018-05-28T07:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721783#M14835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding code verify. CW Eclipse is so complicated and not intuitive, it's not clear for me how to verify code in MCU without erasing. I'm able, but it is so easy to fail to not erase, so |'d rather not provide you with my findings.. Sorry, perhaps someone else can help you how to verify code without erase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, MMCECH == 0x13 is EEPROM ECC exception. I'm not familiar with Freemaster. Does it read&amp;nbsp;memory over BKGD without any assistance from firmware in MCU, right? If so, then it must be machine exception&amp;nbsp;issue. You need to handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to verify your EEPROM ECC exception recovery really works. It can be initiated&amp;nbsp;writing&amp;nbsp;different data to the same location without erase. Not every data will trigger double error, I found some pattern easily. If you have problem with, this may help&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-334381"&gt;https://community.nxp.com/docs/DOC-334381&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 09:33:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721783#M14835</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2018-05-28T09:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: software loss when runnng on car</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721784#M14836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Freemaster can use the BKGD(BDM) to access the data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 13:37:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/software-loss-when-runnng-on-car/m-p/721784#M14836</guid>
      <dc:creator>wangjiajie</dc:creator>
      <dc:date>2018-05-28T13:37:19Z</dc:date>
    </item>
  </channel>
</rss>

