Wrong WDOG timer tick period

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wrong WDOG timer tick period

817 Views
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]

Tags (1)
0 Kudos
3 Replies

720 Views
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 Kudos

698 Views
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 Kudos

597 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stefano-quantic 

Yes, you are right.

Alice_Yang_0-1695694836947.png

 

BR

Alice

 

0 Kudos