<?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: After jumping from boot loader application getting hang.</title>
    <link>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944057#M14201</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;where does this code come from? If you use SMPU, you should know why it is used and how to configure it. &lt;/P&gt;&lt;P&gt;Generally, SMPU is used to protect memory resources against unintentional access. Different tasks can have different access rights. Important point is that if SMPU is enabled, all memory resources must be covered by SMPU descriptors. If you access memory which is not covered, it leads to bus error (machine check exception).&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>Tue, 23 Jul 2019 10:08:01 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2019-07-23T10:08:01Z</dc:date>
    <item>
      <title>After jumping from boot loader application getting hang.</title>
      <link>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944054#M14198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a CAN based bootloader for MPC 5748G.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am referring the application note&amp;nbsp;AN5319 (Which is for serial boot loader).&lt;/P&gt;&lt;P&gt;I was able to download the application software in to the flash at address 0x01040000. My Boot loader application is placed at address 0x1000000. I used the jump method listed in application note.&lt;/P&gt;&lt;P&gt;asm("e_lis r12,0x104");&lt;BR /&gt; asm("e_or2i r12,0x1A20");&lt;BR /&gt; asm("mtlr r0");&lt;BR /&gt; asm("se_blrl");&lt;/P&gt;&lt;P&gt;the jump address is&amp;nbsp;taken from the reset vector which is inside the BAF boot header (0xF94000).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The issue is that , i was able to jump to the __start() section of application. But it is getting hangs in between and the application fails. after this the MCU&amp;nbsp;will not respond to any brake command.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am using Lauterbach debugger and trace 32 for debugging. Find the attached ld files for application and boot loader.&lt;/P&gt;&lt;P&gt;Thanks in advance for any support.&lt;/P&gt;&lt;P&gt;Application Linker file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82268iF93D89BAC747BDDD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Boot loader&lt;SPAN&gt;&amp;nbsp;Linker file:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/82302i62CB6964954068E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 11:29:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944054#M14198</guid>
      <dc:creator>sreevalsan_p</dc:creator>
      <dc:date>2019-07-19T11:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: After jumping from boot loader application getting hang.</title>
      <link>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944055#M14199</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;because you use inline assembler, you do not jump to the application right after reset in startup file, right? In this case, have you disabled all interrupts? It's also good practice to configure everything back to default state. Or the application must be aware that not everything is in default state. If it is not done in this way, it usually causes troubles like described.&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, 22 Jul 2019 08:01:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944055#M14199</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-07-22T08:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: After jumping from boot loader application getting hang.</title>
      <link>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944056#M14200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally i am able to run the application after jumping from bootloader.&lt;/P&gt;&lt;P&gt;I has to edit the startup script of application. the flash start address in the SMPU register has modified and it works now.&lt;/P&gt;&lt;P&gt;But i don't know why ?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following are the address which was there by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/******************************************************************/&lt;BR /&gt;/* Freescale Guidance 4 - SMPU */&lt;BR /&gt;/******************************************************************/&lt;BR /&gt; /* Configure Flash region */&lt;BR /&gt; SMPU_0.RGD[0].WORD0.R = 0x00400000; /* Start Address */&lt;BR /&gt; /* change to 0x0040_0000 (UTEST, BAF, DataFlash) */&lt;BR /&gt; SMPU_0.RGD[0].WORD1.R = 0x02000000; /* End Address */&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;-------&lt;/P&gt;&lt;P&gt;/* Configure Flash region */&lt;BR /&gt; SMPU_1.RGD[0].WORD0.R = 0x00400000; /* Start Address */&lt;BR /&gt; /* change to 0x0040_0000 (UTEST, BAF, DataFlash) */&lt;BR /&gt; SMPU_1.RGD[0].WORD1.R = 0x02000000; /* End Address */&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed to&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SMPU_0.RGD[0].WORD0.R = 0x00FC0000 ;&amp;nbsp;/* Start Address */&amp;nbsp; &amp;nbsp; // Old was&amp;nbsp;&amp;nbsp;0x00400000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SMPU_0.RGD[0].WORD1.R =&amp;nbsp;0x0157FFFF ;&amp;nbsp;&amp;nbsp;/* End Address */&amp;nbsp; &amp;nbsp; // Old was&amp;nbsp;&amp;nbsp;&amp;nbsp;0x02000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SMPU_1.RGD[0].WORD0.R = 0x00FC0000 ;&amp;nbsp;/* Start Address */&amp;nbsp; &amp;nbsp; // Old was&amp;nbsp;&amp;nbsp;0x00400000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SMPU_1.RGD[0].WORD1.R =&amp;nbsp;0x0157FFFF ;&amp;nbsp;&amp;nbsp;/* End Address */&amp;nbsp; &amp;nbsp; // Old was&amp;nbsp;&amp;nbsp;&amp;nbsp;0x02000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;what is the relevance&amp;nbsp;of&amp;nbsp;SMPU register configuration.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:35:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944056#M14200</guid>
      <dc:creator>sreevalsan_p</dc:creator>
      <dc:date>2019-07-22T12:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: After jumping from boot loader application getting hang.</title>
      <link>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944057#M14201</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;where does this code come from? If you use SMPU, you should know why it is used and how to configure it. &lt;/P&gt;&lt;P&gt;Generally, SMPU is used to protect memory resources against unintentional access. Different tasks can have different access rights. Important point is that if SMPU is enabled, all memory resources must be covered by SMPU descriptors. If you access memory which is not covered, it leads to bus error (machine check exception).&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>Tue, 23 Jul 2019 10:08:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/After-jumping-from-boot-loader-application-getting-hang/m-p/944057#M14201</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2019-07-23T10:08:01Z</dc:date>
    </item>
  </channel>
</rss>

