<?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: How to reset without triggering bootloader ? in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802170#M48778</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;If you have a hard fault it is easy to solve because the hard fault is effectively showing you what has gone wrong.&lt;BR /&gt;Mostly it is because of accessing peripherals that haven't been enabled or an un-initialised pointer of some kind. With the debugger the reasons can directly be seen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2018 12:35:36 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2018-10-23T12:35:36Z</dc:date>
    <item>
      <title>How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802165#M48773</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;In a specific use case of the application I want to reset the application without triggering the bootloader. From my understanding this can be done by pointing the program counter to the startup code ? But not sure how this can be done ? Also not sure how to find the startup code address ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the environment I am working on:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCU : MK20DX256VLL7&lt;/P&gt;&lt;P&gt;Compiler: gcc&lt;/P&gt;&lt;P&gt;IDE: code warrior&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 09:13:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802165#M48773</guid>
      <dc:creator>sudeepchandrase</dc:creator>
      <dc:date>2018-10-17T09:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802166#M48774</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;The K20 has no (internal) boot loader so you must be referring to a loader that has been programmed to the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See appendix C of the uTasker boot loader guide for a method that it supports for allowing the application to command a reset WITH or WITHOUT the boot loader being started. This is a simple and reliable method that can also be added to any boot loaders if needed - it ensures a clean HW reset without complications that can arise by manipulating PC and SP to emulate a reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;Kinetis K20:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K20D50M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K20D50M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K20D50M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K20D50M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K20D72M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K20D72M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTEENSY_3.1.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TEENSY_3.1.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FtinyK20.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/tinyK20.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For less questions and restrictions, and faster, cheaper developments: try uTasker for Kinetis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 15:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802166#M48774</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-10-17T15:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802167#M48775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the swift response. As you have rightly pointed out, I am using a custom bootloader. Now the challenge is that I am not allowed to change the source code for the bootloader. My idea is to start the application code(not the bootloader) in case on any fault(hard fault, bus fault etc). Could you suggest a mechanism ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 03:48:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802167#M48775</guid>
      <dc:creator>sudeepchandrase</dc:creator>
      <dc:date>2018-10-19T03:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802168#M48776</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;You will know the start address of the application and its initial stack pointer so you can load the SP and PC with these values and the program will restart.&lt;/P&gt;&lt;P&gt;Before doing this disable interrupt, power down used modules and disable interrupts and pending interrupts so that the processor is in more or less its HW reset state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg.&lt;BR /&gt;uDisable_Interrupt();&lt;/P&gt;&lt;P&gt;SYSTICK_CSR = 0;&lt;BR /&gt;POWER_DOWN(5, (SIM_SCGC5_LPUART0));&lt;BR /&gt;IRQ0_31_CER&amp;nbsp; = 0xffffffff;&lt;BR /&gt;IRQ32_63_CER = 0xffffffff;&lt;BR /&gt;IRQ64_95_CER = 0xffffffff;&lt;BR /&gt;IRQ0_31_CPR&amp;nbsp; = 0xffffffff;&lt;BR /&gt;IRQ32_63_CPR = 0xffffffff;&lt;BR /&gt;IRQ64_95_CPR = 0xfffffff; &lt;BR /&gt;// load SP with initial stack pointer value&lt;BR /&gt;// load PC with application start address&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802168#M48776</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-10-19T15:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802169#M48777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;Hi Mark,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;Thanks for the suggestion. I did something similar:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;1. Disable interrupts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;2. Called the startup function(this from my understanding automatically sets the PC and SP to the relevant addresses).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;Cpu_DisableInt();&lt;/SPAN&gt;&lt;BR style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;" /&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;unsigned long startup = ((unsigned long*)0x00007800)[1];&amp;nbsp; /// The vector table start address is 7800.&lt;/SPAN&gt;&lt;BR style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;" /&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;((void(*)(void))startup)();&lt;/SPAN&gt;&lt;BR style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;But I notice a behavior where the device starts from the main and starts executing but then resets after some time(through mostly hard fault).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0.87); background-color: #fafafa;"&gt;Could&amp;nbsp; you help me understand the behavior.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 04:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802169#M48777</guid>
      <dc:creator>sudeepchandrase</dc:creator>
      <dc:date>2018-10-23T04:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to reset without triggering bootloader ?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802170#M48778</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;If you have a hard fault it is easy to solve because the hard fault is effectively showing you what has gone wrong.&lt;BR /&gt;Mostly it is because of accessing peripherals that haven't been enabled or an un-initialised pointer of some kind. With the debugger the reasons can directly be seen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 12:35:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-to-reset-without-triggering-bootloader/m-p/802170#M48778</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-10-23T12:35:36Z</dc:date>
    </item>
  </channel>
</rss>

