<?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: LPC845 - disable Watchdog before application jumps to bootloader in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1459311#M48795</link>
    <description>&lt;P&gt;I would need to read the manual for the LPC845, but for almost all other MCUs I came across, a watchdog cannot be disabled once it is enabled. This is by design.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; I'm successfully jump from bootloader to application and application to bootloader.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We use bootloaders for all our devices, on several architectures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, we do never "jump" from application to bootloader, but set a specific "stay in BL flag", and reset the device to get back into the BL. Often simply by a busy loop to run into the watchdog-reset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The BL only executes the application if it is correct (checksum), and the "stay in BL" flag is not set.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2022 11:15:53 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2022-05-17T11:15:53Z</dc:date>
    <item>
      <title>LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1419999#M48022</link>
      <description>&lt;P&gt;I'm successfully jump from bootloader to application and application to bootloader.&lt;/P&gt;&lt;P&gt;Please note I'm not using watchdog in my bootloader.&lt;/P&gt;&lt;P&gt;When I'm enable watchdog in application it successfully jumps to bootloader but it reset after watchdog timeout. when I'm disable (not initialize) watchdog then it works.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Application to bootloader jump Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;WWDT_Deinit(WWDT);&lt;BR /&gt;POWER_DisablePD(kPDRUNCFG_PD_WDT_OSC);&lt;BR /&gt;NVIC_DisableIRQ(WDT_IRQn);&lt;BR /&gt;while(xUART[0].u1TxOnGoing); // wait till UART send all bytes&lt;BR /&gt;FirmwareUtility_Boot(0x3000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void FirmwareUtility_Boot(U32 u32Address)&lt;BR /&gt;{&lt;BR /&gt;/* Ref: &lt;A href="https://community.nxp.com/thread/494497" target="_blank"&gt;https://community.nxp.com/thread/494497&lt;/A&gt; */&lt;BR /&gt;typedef void (*APPLICATION)(void);&lt;/P&gt;&lt;P&gt;APPLICATION xEntryPoint;&lt;/P&gt;&lt;P&gt;// Clear all interrupts and disable before vector reallocate&lt;BR /&gt;_ClearDisableAllIRQ();&lt;/P&gt;&lt;P&gt;/* Disable SysTick timer */&lt;BR /&gt;SysTick-&amp;gt;CTRL &amp;amp;= ~(SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk);&lt;/P&gt;&lt;P&gt;// Vector reallocate&lt;BR /&gt;__DSB();&lt;BR /&gt;__ISB();&lt;BR /&gt;__set_MSP(*((U32 *)u32Address));&lt;BR /&gt;SCB-&amp;gt;VTOR = (u32Address &amp;amp; SCB_VTOR_TBLOFF_Msk);&lt;BR /&gt;__DSB();&lt;BR /&gt;__ISB();&lt;/P&gt;&lt;P&gt;xEntryPoint = (APPLICATION) *((U32 *)(u32Address + 4));&lt;/P&gt;&lt;P&gt;_DisablePLL();&lt;BR /&gt;xEntryPoint();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Feb 2022 05:05:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1419999#M48022</guid>
      <dc:creator>jtro</dc:creator>
      <dc:date>2022-02-26T05:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1420861#M48066</link>
      <description>&lt;P&gt;Hi&amp;nbsp;jtro&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may set flag in your boot code to monitor where your code invoke watchdog.&lt;/P&gt;
&lt;P&gt;But I suggest you disable watchdog before entering main code. some system initialization code. Normally we won't see any problem in a new created project.&lt;/P&gt;
&lt;P&gt;But for example If the code includes&amp;nbsp; large global array, RAM initialization in startup code takes time. If the program has many global variables to be initialized, technically it's hard to feed dog during the initialization process.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it's right to watchdog before enter your application. enable it after the code gets into application.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a nice day,&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 02:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1420861#M48066</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-03-01T02:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1423653#M48122</link>
      <description>&lt;P&gt;That's what I have asked in my first post I'm disabling watchdog before jump but not able to disable it.&lt;/P&gt;&lt;P&gt;In user manual (Rev. 1.6 — 8 December 2017) page 416 I found it is written that "“Safe” watchdog operation. Once enabled, requires a hardware reset or a Watchdog reset to be disabled." check attached image.&lt;/P&gt;&lt;P&gt;Is it that once I enable watchdog then I can't disable it in same application without reset?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 04:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1423653#M48122</guid>
      <dc:creator>jtro</dc:creator>
      <dc:date>2022-03-07T04:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1424238#M48136</link>
      <description>&lt;P&gt;try to set watchdog WINDOW register as&amp;nbsp;0xFF FFFF in the beginning of your startup code. see if this can resolve the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 03:31:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1424238#M48136</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-03-08T03:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1459262#M48794</link>
      <description>&lt;P&gt;I seems got the same issue with LPC1830.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I open WWDG, I found it can not disable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found&amp;nbsp; the register value is&amp;nbsp; "LPC_WWDT-&amp;gt;MOD = 3".&amp;nbsp; But register is out of control. Even if I has disable wwdt interupt trigger.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;NVIC_DisableIRQ(WWDT_IRQn);&amp;nbsp; But still not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 09:44:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1459262#M48794</guid>
      <dc:creator>andarm</dc:creator>
      <dc:date>2022-05-17T09:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC845 - disable Watchdog before application jumps to bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1459311#M48795</link>
      <description>&lt;P&gt;I would need to read the manual for the LPC845, but for almost all other MCUs I came across, a watchdog cannot be disabled once it is enabled. This is by design.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; I'm successfully jump from bootloader to application and application to bootloader.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We use bootloaders for all our devices, on several architectures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, we do never "jump" from application to bootloader, but set a specific "stay in BL flag", and reset the device to get back into the BL. Often simply by a busy loop to run into the watchdog-reset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The BL only executes the application if it is correct (checksum), and the "stay in BL" flag is not set.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 11:15:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC845-disable-Watchdog-before-application-jumps-to-bootloader/m-p/1459311#M48795</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2022-05-17T11:15:53Z</dc:date>
    </item>
  </channel>
</rss>

