Wrong WDOG timer tick period

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

Wrong WDOG timer tick period

1,167件の閲覧回数
stefano-quantic
Contributor III

For iMXRT1176, in "Config Tools | Peripherals | Peripheral drivers (Device Specific) | WDOG | Watchdog configuration" there is a parameter called "Timer tick period". This is a calculated value, not one that the user can select.
In my case, it shows "68.269us", and I can't understand where this value comes from. WDOG should run off a 32.768 kHz clock, so the period should be ~30.518us; and anyway, the actual resolution of the WDOG is 0.5s, so this period is useless to know.
This period value is related to the "Clock source" of the WDOG (which in my case is "Bus clock root", @240MHz).
However, the period does not correspond to 240MHz (i.e. 4.17ns), nor to a multiple of it.
Also, the bus clock is used for accessing the WDOG registers, not for the WDOG counting itself.

So, what's the purpose of this "Timer tick period"?
Is it correct that the WDOG counts off of the 32.768kHz clock?

Note: for the RTWDOG peripheral, this parameter seems to make sense: there you can actually select the clock source from a list of options, and the "Period of counter tick" calculated there is exactly 1/frequency.
So, maybe, "Timer tick period" should just be removed from the WDOG peripheral.

I'm using Config Tools shipped with MCUXpresso IDE v11.7.0 [Build 9198] [2023-01-17]

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

1,070件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stefano-quantic 

Timer tick period is time period of one tick of the watchdog timer.

After change clock source, this will be changed, you can test.

Alice_Yang_0-1695029689658.png

 

BR

Alice

0 件の賞賛
返信

1,048件の閲覧回数
stefano-quantic
Contributor III

Just to be clear: I'm talking about WDOG1 and WDOG2 (not RTWDOG, i.e. RTWDOG3 and RTWDOG4).

For these WDOGs, I cannot change the clock source; Config Tools only have one single option: "Bus clock root".
However, this is the clock used for the WDOG bus interface (i.e. to access its registers), whereas the clock that feeds the counter should be 32.768 kHz (external XTAL, with fallback to the internal RCOSC in case of failure).
Is my understanding correct?

If it is, then the calculated tick period should not be based on the bus clock, but on the 32.768 kHz clock.
Anyway, we cannot set the WDOG timeout with 1 CK granularity, but only in increments of 0.5s (from 0.5s to 128s), so calculating the tick period is useless.

0 件の賞賛
返信

947件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stefano-quantic 

Yes, you are right.

Alice_Yang_0-1695694836947.png

 

BR

Alice

 

0 件の賞賛
返信