K64F watchdog timeout value

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K64F watchdog timeout value

1,408件の閲覧回数
unknowncoder
Contributor III

I am having trouble converting millisecond to the watchdog timeout value when using MCUXpresso watchdog driver.

Please validate my math.

One tick of the watchdog = 1 ms. With the given configuration

  • Watchdog clock = kWDOG_LpoClockSource = 1KHz
  • Watchdog prescaler = 1

Therefore when I setup the watchdog I do

wdog_config_t config;

 WDOG_GetDefaultConfig(&config);

config.timeoutValue = 1000;

This should make the watchdog timeout in 1 second but it seem to be timing out alot sooner.

ラベル(1)
タグ(3)
0 件の賞賛
返信
3 返答(返信)

1,187件の閲覧回数
unknowncoder
Contributor III

This problem has been resolved. 

There some some incorrect timer calculation occurring in the code.

0 件の賞賛
返信

1,187件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Desmond,

Would you please tell us how did you see it time out alot sooner?
Maybe you can toggle a pin and then WDOG_Refresh it only once. Measure the Reset_b pin waveform and observe if the voltage will low after 1ms.

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,187件の閲覧回数
jschepler
Contributor III

Hi Desmond,

Can you show your entire config structure?

If you actually are assigning "1" to you're prescaler value in the config then it will be divided by 2 in the driver.

I am using KSDK 1.3.0 and the ENUM to divide by 1 in the driver is: kWdogClkPrescalerDivide1

The enum value of that is 0.

0 件の賞賛
返信