<?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>MPC5xxx中的主题 Re: MPC5748G Cannot attached JTAG after erase all?</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/1454550#M21134</link>
    <description>&lt;P&gt;check this solution worked for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/CodeWarrior-Development-Tools/Target-may-have-enterd-power-reset-escalation-please-power-cycle/m-p/898792" target="_blank"&gt;https://community.nxp.com/t5/CodeWarrior-Development-Tools/Target-may-have-enterd-power-reset-escalation-please-power-cycle/m-p/898792&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 08 May 2022 13:23:51 GMT</pubDate>
    <dc:creator>Amr_Awny</dc:creator>
    <dc:date>2022-05-08T13:23:51Z</dc:date>
    <item>
      <title>MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617380#M5274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I erased all block from C55 Driver.&lt;/P&gt;&lt;P&gt;I try attach JTAG. but didn't&amp;nbsp;attache.&lt;/P&gt;&lt;P&gt;I think erased BAF&amp;nbsp;block. Is it right?&lt;/P&gt;&lt;P&gt;and Can I get BAF Image or other recovery solution(use t32??)?&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;T32 is support "Halt Core at power-on&amp;nbsp;reset" so can attached.&lt;/P&gt;&lt;P&gt;how to make "Halt Core at power-on reset" ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;My system can control JTAG pins and Reset Pin. Can I make that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jan 2017 23:12:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617380#M5274</guid>
      <dc:creator>kimyoungsu</dc:creator>
      <dc:date>2017-01-15T23:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617381#M5275</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 BAF recovery - see this thread:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/806415?commentID=806415#comment-806415" title="https://community.nxp.com/message/806415?commentID=806415#comment-806415"&gt;https://community.nxp.com/message/806415?commentID=806415#comment-806415&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you can do that. Background: if there's no code in the flash which disables watchdog, the device will be reset several times after power-on and then it will be forced to permanent reset due to reset escalation feature. To avoid that, it is necessary to force the reset pin low, then power-up the device, enter debug mode during reset and disable the watchdog. That's what the "Halt Core at power-on&amp;nbsp;reset" does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 09:45:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617381#M5275</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2017-01-16T09:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617382#M5276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think enter escalation feature under picture. is it right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;if under picture right then my h/w modify to control main power.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="esc.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/11169i8E9223A59AC00A37/image-size/large?v=v2&amp;amp;px=999" role="button" title="esc.png" alt="esc.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 01:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617382#M5276</guid>
      <dc:creator>kimyoungsu</dc:creator>
      <dc:date>2017-01-19T01:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617383#M5277</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;yes, that's exactly what you need to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 07:10:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617383#M5277</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2017-01-19T07:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617384#M5278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started using the DEVKIT-MPC5748G, successfully tried to compile, flash&lt;BR /&gt;and debug the simple samples with the S32 Design Studio and ran&lt;BR /&gt;successfully through the mini tutorial to create the blinking LED&lt;BR /&gt;application with the Processor Expert. Then I modified my existing&lt;BR /&gt;MPC5643L code, flashed it - and got immediately stuck! Soon I found the&lt;BR /&gt;problem in the source code but no way to connect to the board anymore in&lt;BR /&gt;order to flash the corrected code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Googling brought me soon to this and the related threads and this was most&lt;BR /&gt;helpful to understand the situation of having an either bricked MCU or a&lt;BR /&gt;destructive reset after reset escalation. Using my scope I could prove&lt;BR /&gt;within a few minutes that I was in the lucky latter situation. However,&lt;BR /&gt;how to recover from that situation? The threads gave the right hints but I&lt;BR /&gt;didn't find a to-the-point recipe what to do concretely. Here, I want to&lt;BR /&gt;fill this gap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The DEVKIT has an on board JTAG debugger, which is not capable to connect&lt;BR /&gt;to the MCU any more ("Cannot put the MCU into background mode" or&lt;BR /&gt;similar). The explanations given in these threads make it probable that&lt;BR /&gt;the connection has to happen before we reach the destructive reset, i.e.&lt;BR /&gt;after power on and during reset escalation. This is a time span of about&lt;BR /&gt;300ms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the DEVKIT the debugger is normally turned on together with the MCU.&lt;BR /&gt;And it's simply impossible to first startup the debugger and then issue&lt;BR /&gt;the connect to target commands within 300ms. Once the debugger is ready to&lt;BR /&gt;operate the MCU is again in its destructive reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I connected a P&amp;amp;E Multilink Interface to the DEVKIT's JTAG connector. This&lt;BR /&gt;decouples debugger startup and powering the MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connecting the P&amp;amp;E Multilink Interface: The colored wire in the JTAG&lt;BR /&gt;ribbon cable belongs to pin 1 on the PCB; a small "1" is printed on the&lt;BR /&gt;PCB close to the connector. It doesn't matter that we have two P&amp;amp;E USB&lt;BR /&gt;debuggers connected simultaneously to PC: The command line of the debugger&lt;BR /&gt;server will address to the right one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next problem: At the beginning I had mainly used the debugger through the&lt;BR /&gt;S32DS Eclipse interface. This means a strong delay between clicking the&lt;BR /&gt;debug button and the debugger making the connection to the target. All of&lt;BR /&gt;this takes much more than 300ms. Maybe it would be possible to first start&lt;BR /&gt;the debugger, count till three and then power on the MCU, but one would be&lt;BR /&gt;very lucky to succeed using this weak timing strategy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I decided to use the debugger on the command line. Starting the&lt;BR /&gt;server involves an immediate attempt to connect to the target. The&lt;BR /&gt;strategy: Type the command line and hold your finger above the enter key.&lt;BR /&gt;Then plug-in the USB wire to the DEVKIT at the same time you release your&lt;BR /&gt;finger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Already in my second attempt the technique succeeded and I got connected&lt;BR /&gt;to the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many people may have bought their DEVKIT because of it's amazing&lt;BR /&gt;attractive price and they won't have bought an additional Multilink&lt;BR /&gt;debugger, which costs much more on its own then the entire DEVKIT&lt;BR /&gt;including the debugger. Next step was to find out how the same can be&lt;BR /&gt;achieved with the on-board debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A view at the schematics revealed that powering of the debugger and of the&lt;BR /&gt;MCU is indeed decoupled though the jumper to select either USB or external&lt;BR /&gt;12V powering. Two possible strategies:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Jumper and connect the external 12V supply via a switch (switch is&lt;BR /&gt;off), plug in the DEVKIT, enter the start server command line (finger&lt;BR /&gt;still above enter key), then switch 12V supply on and hit the enter key at&lt;BR /&gt;the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The jumper for selecting the power supply for the MCU can be abused as&lt;BR /&gt;switch to power the MCU on or off: If it is detached the MCU is unpowered&lt;BR /&gt;(but the debugger still is through USB), if it is attached in position&lt;BR /&gt;select-USB-power then the MCU is powered. Strategy 2) is identical to 1)&lt;BR /&gt;except for not switching the external 12V supply but using the jumper as&lt;BR /&gt;MCU power switch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried 2), and since handling the jumper as switch is a bit tricky it&lt;BR /&gt;took me this time five or six attempts to get the connection. But still an&lt;BR /&gt;acceptable way of doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we have the debugger connected to the MCU but the SW fault leading to&lt;BR /&gt;the reset escalation is not fixed. We can first use the debugger to&lt;BR /&gt;identify the problem but eventual we need to use it to flash a corrected&lt;BR /&gt;piece of software. Getting here you should have a proven *.elf file at&lt;BR /&gt;hand, take any previously compiled, still success build. There are two&lt;BR /&gt;ways to flash this binary and/or step through the still flashed, faulty&lt;BR /&gt;software:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) In S32DS, duplicate and modify your Debug Configuration normally used&lt;BR /&gt;for flashing. By default, the debug configurations start the debugger&lt;BR /&gt;server every time you click on debug. Our server is already started and we&lt;BR /&gt;need to modify the configuration such that it not starts a server and&lt;BR /&gt;connects (through a TCP/IP socket) to our already started server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Open a new shell window and start the debugger client from the command&lt;BR /&gt;line. Issue the debugger commands to start the software, step through it&lt;BR /&gt;and finally the flash command to replace it with the proven, well working&lt;BR /&gt;binary you have at hand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only tried 2) but 1) is likely straightforward, too, as the S32DS GUI&lt;BR /&gt;exposes the according elements to click.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After flashing the proven binary the board is back in the normal state.&lt;BR /&gt;The debug server can be disconnected and stopped, and the S32DS can be&lt;BR /&gt;applied as normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the command lines, you need to perform the steps of the recipe.&lt;BR /&gt;(&amp;lt;installDir&amp;gt; is the root directory of your S32DS installation, the&lt;BR /&gt;folder, where Cross_Tools, Drivers, eclipse and more can be found in):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Command line to start the debugger server if the P&amp;amp;E Multilink debugger&lt;BR /&gt;is used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;installDir&amp;gt;\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\pegdbserver_power_console.exe -device=MPC5748g -startserver -serverport=7224 -gdbmport=6224 -interface=USBMULTILINK -speed=5000 -port=USB1 -verbose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Command line to start the debugger server if the built-in openSDA&lt;BR /&gt;debugger is used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;installDir&amp;gt;\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.2.201709281658\win32\pegdbserver_power_console.exe -device=MPC5748g -startserver -serverport=7224 -gdbmport=6224 -interface=OPENSDA -speed=5000 -port=USB1 -verbose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Command line to start the debugger client from another shell window:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;installDir&amp;gt;\Cross_Tools\powerpc-eabivle-4_9\bin\powerpc-eabivle-gdb.exe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following commands are submitted from the command line of the debugger&lt;BR /&gt;client after the debugger server was successfully started and got the&lt;BR /&gt;connection to the board and after the debugger client has been started:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Connect the client to the debugger server:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;target remote localhost:7224&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Commands to initialize the debug session. (These commands have been&lt;BR /&gt;taken from the console window of the S32DS debug session. I don't know&lt;BR /&gt;whether or to which extend they are essential):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set mem inaccessible-by-default off&lt;BR /&gt;set tcp auto-retry on&lt;BR /&gt;set tcp connect-timeout 240&lt;BR /&gt;set remotetimeout 60&lt;BR /&gt;monitor preserve1 0&lt;BR /&gt;monitor preserve2 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6) If you want to step through the buggy, still flashed code then you need&lt;BR /&gt;to load the related *.elf file to have the symbols and references to the&lt;BR /&gt;source code. Note Windows users, &amp;lt;pathToElfFile&amp;gt; uses either slashes or&lt;BR /&gt;double backslashes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol-file &amp;lt;pathToElfFile&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use commands like&lt;BR /&gt;&amp;nbsp; help,&lt;BR /&gt;&amp;nbsp; disass $pc,+100 (dissamble),&lt;BR /&gt;&amp;nbsp; l (list source code),&lt;BR /&gt;&amp;nbsp; p (print)&lt;BR /&gt;&amp;nbsp; b (set breakpoint),&lt;BR /&gt;&amp;nbsp; n (next instruction),&lt;BR /&gt;&amp;nbsp; s (step),&lt;BR /&gt;&amp;nbsp; u (until line),&lt;BR /&gt;&amp;nbsp; c (continue),&lt;BR /&gt;&amp;nbsp; etc.&lt;BR /&gt;to debug your code. Be careful, don't get stuck again at your SW bug, it's&lt;BR /&gt;still there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Flash the other, proven binary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load &amp;lt;pathToProvenElfFile&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8) End the session:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;detach&lt;BR /&gt;q&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note q will end the client. The server in the other shell window can be&lt;BR /&gt;stopped with Ctrl-C. The connection to the hardware is lost and the board&lt;BR /&gt;should be fine again. Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2018 14:32:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/617384#M5278</guid>
      <dc:creator>peter_vranken</dc:creator>
      <dc:date>2018-10-07T14:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Cannot attached JTAG after erase all?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/1454550#M21134</link>
      <description>&lt;P&gt;check this solution worked for me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/CodeWarrior-Development-Tools/Target-may-have-enterd-power-reset-escalation-please-power-cycle/m-p/898792" target="_blank"&gt;https://community.nxp.com/t5/CodeWarrior-Development-Tools/Target-may-have-enterd-power-reset-escalation-please-power-cycle/m-p/898792&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2022 13:23:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Cannot-attached-JTAG-after-erase-all/m-p/1454550#M21134</guid>
      <dc:creator>Amr_Awny</dc:creator>
      <dc:date>2022-05-08T13:23:51Z</dc:date>
    </item>
  </channel>
</rss>

