<?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>LPC MicrocontrollersのトピックRe: LPC54618 WWDG clock is not precise？</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269523#M44815</link>
    <description>&lt;P&gt;Hi, Yang&lt;/P&gt;
&lt;P&gt;Pls refer to section 7.5.79 Watchdog oscillator control register, the wdt_clk is of +/- 40% accuracy over temperature, voltage, and silicon processing variations. So it can explain&amp;nbsp; that you see 800ms when you expect 1s.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7.5.79 Watchdog oscillator control register&lt;BR /&gt;This register controls the frequency of the watchdog oscillator, in the range of 6 kHz to 1.5&lt;BR /&gt;MHz. This oscillator is connected to the watchdog timer and the Micro-tick Timer. The&lt;BR /&gt;low-power nature of this oscillator limits its accuracy to +/- 40% over temperature, voltage,&lt;BR /&gt;and silicon processing variations. The actual frequency may be measured using the&lt;BR /&gt;frequency measure block. See Section 7.2.3.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Apr 2021 08:42:25 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2021-04-28T08:42:25Z</dc:date>
    <item>
      <title>LPC54618 WWDG clock is not precise？</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269428#M44811</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I use NXP LPC54618 sdk to test wwdog ，I find that the wwdog is not precise ？ When I set wwdog&amp;nbsp;window value is 1s ,but it seems like 800 ms feed dog once?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;my code :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;void delayWwdtWindow(void)&lt;/FONT&gt;&lt;BR /&gt;{&lt;BR /&gt;/* For the TV counter register value will decrease after feed watch dog,&lt;BR /&gt;* we can use it to as delay. But in user scene, user need feed watch dog&lt;BR /&gt;* in the time period after enter Window but before warning intterupt.&lt;BR /&gt;*/&lt;BR /&gt;while (WWDT-&amp;gt;TV &amp;gt; WWDT-&amp;gt;WINDOW)&lt;BR /&gt;{&lt;BR /&gt;__NOP();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*!&lt;BR /&gt;* @brief Main function&lt;BR /&gt;*/&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;wwdt_config_t config;&lt;BR /&gt;uint32_t wdtFreq;&lt;BR /&gt;bool timeOutResetEnable;&lt;/P&gt;&lt;P&gt;/* Init hardware*/&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Gpio0);&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_Gpio2);&lt;BR /&gt;/* attach 12 MHz clock to FLEXCOMM0 (debug console) */&lt;BR /&gt;CLOCK_AttachClk(BOARD_DEBUG_UART_CLK_ATTACH);&lt;/P&gt;&lt;P&gt;BOARD_InitPins(); //2_2 LED3&lt;BR /&gt;BOARD_BootClockPLL180M();&lt;BR /&gt;BOARD_InitDebugConsole();&lt;BR /&gt;&lt;BR /&gt;/* Set Red LED to initially be high */&lt;BR /&gt;APP_LED_INIT;&lt;/P&gt;&lt;P&gt;#if !defined(FSL_FEATURE_WWDT_HAS_NO_PDCFG) || (!FSL_FEATURE_WWDT_HAS_NO_PDCFG)&lt;BR /&gt;POWER_DisablePD(kPDRUNCFG_PD_WDT_OSC);&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;/* Enable the WWDT time out to reset the CPU. */&lt;BR /&gt;timeOutResetEnable = true;&lt;/P&gt;&lt;P&gt;/* Check if reset is due to Watchdog */&lt;BR /&gt;if (WWDT_GetStatusFlags(WWDT) &amp;amp; kWWDT_TimeoutFlag)&lt;BR /&gt;{&lt;BR /&gt;APP_LED_ON;&lt;BR /&gt;PRINTF("Watchdog reset occurred\r\n");&lt;BR /&gt;timeOutResetEnable = false;&lt;BR /&gt;/* The timeout flag can only clear when and after wwdt intial. */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* wdog refresh test in window mode/timeout reset */&lt;BR /&gt;PRINTF("\r\n--- %s test start ---\r\n", (timeOutResetEnable) ? "Time out reset" : "Window mode refresh");&lt;/P&gt;&lt;P&gt;/* The WDT divides the input frequency into it by 4 */&lt;BR /&gt;wdtFreq = WDT_CLK_FREQ / 4;&lt;/P&gt;&lt;P&gt;WWDT_GetDefaultConfig(&amp;amp;config);&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;* Set watchdog feed time constant to approximately 4s&lt;BR /&gt;* Set watchdog warning time to 512 ticks after feed time constant&lt;BR /&gt;* Set watchdog window time to 1s&lt;BR /&gt;*/&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;config.timeoutValue = wdtFreq * 4 ;&lt;/FONT&gt;&lt;BR /&gt;config.warningValue = 512;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;config.windowValue = wdtFreq * 1;&lt;/FONT&gt;&lt;BR /&gt;/* Configure WWDT to reset on timeout */&lt;BR /&gt;config.enableWatchdogReset = true;&lt;BR /&gt;/* Setup watchdog clock frequency(Hz). */&lt;BR /&gt;config.clockFreq_Hz = WDT_CLK_FREQ;&lt;BR /&gt;WWDT_Init(WWDT, &amp;amp;config);&lt;BR /&gt;&lt;BR /&gt;// NVIC_EnableIRQ(APP_WDT_IRQn);&lt;/P&gt;&lt;P&gt;while (1)&lt;BR /&gt;{&lt;BR /&gt;if (timeOutResetEnable)&lt;BR /&gt;{&lt;BR /&gt;/* SDK_DelayAtLeastUs can be replaced by Detail User code*/&lt;BR /&gt;SDK_DelayAtLeastUs(1000, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;/* The WINDOW register determines the highest TV value allowed when a watchdog feed is&lt;BR /&gt;* performed. If a feed sequence occurs when TV is greater than the value in WINDOW, a&lt;BR /&gt;* watchdog event will occur. User can set window same as timeout value if required. */&lt;BR /&gt;delayWwdtWindow();&lt;BR /&gt;WWDT_Refresh(WWDT);&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;APP_LED_TOGGLE;&amp;nbsp; &amp;nbsp;//use a&amp;nbsp;oscilloscope to check time if precise&lt;/FONT&gt;&lt;BR /&gt;// PRINTF(" WDOG has been refreshed!\r\n");&lt;BR /&gt;/* SDK_DelayAtLeastUs can be replaced by Detail User code*/&lt;BR /&gt;// SDK_DelayAtLeastUs(1000, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2400MS   is    NOT  3S" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/143505i7C8A73AE8F49B5AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LEDTOGLE.jpg" alt="2400MS   is    NOT  3S" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2400MS   is    NOT  3S&lt;/span&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;thank you！&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 07:01:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269428#M44811</guid>
      <dc:creator>Xiaoyh</dc:creator>
      <dc:date>2021-04-28T07:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54618 WWDG clock is not precise？</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269523#M44815</link>
      <description>&lt;P&gt;Hi, Yang&lt;/P&gt;
&lt;P&gt;Pls refer to section 7.5.79 Watchdog oscillator control register, the wdt_clk is of +/- 40% accuracy over temperature, voltage, and silicon processing variations. So it can explain&amp;nbsp; that you see 800ms when you expect 1s.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7.5.79 Watchdog oscillator control register&lt;BR /&gt;This register controls the frequency of the watchdog oscillator, in the range of 6 kHz to 1.5&lt;BR /&gt;MHz. This oscillator is connected to the watchdog timer and the Micro-tick Timer. The&lt;BR /&gt;low-power nature of this oscillator limits its accuracy to +/- 40% over temperature, voltage,&lt;BR /&gt;and silicon processing variations. The actual frequency may be measured using the&lt;BR /&gt;frequency measure block. See Section 7.2.3.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 08:42:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269523#M44815</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-04-28T08:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54618 WWDG clock is not precise？</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269958#M44831</link>
      <description>&lt;P&gt;Thank you for your reply ! As you said ,the error is normal？&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THANK YOU!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 00:45:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1269958#M44831</guid>
      <dc:creator>Xiaoyh</dc:creator>
      <dc:date>2021-04-29T00:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54618 WWDG clock is not precise？</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1270002#M44832</link>
      <description>&lt;P&gt;Hi, Yang,&lt;/P&gt;
&lt;P&gt;The error is normal, because the watchdog internal clock wdt_clk is inaccurate.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 02:27:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-WWDG-clock-is-not-precise/m-p/1270002#M44832</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-04-29T02:27:36Z</dc:date>
    </item>
  </channel>
</rss>

