MOD54415 TimerTick
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
MOD54415 TimerTick
So a long time ago, I found a bit of HTML in the factory demo that called the system for a tick count which would display the number of seconds that the system had been running for (TimeTick/TICKS_PER_SECOND) - I found the HTML code, but for the life of me I cannot find any reference to the function it calls for some reason. I need to store a DWORD of the total time the system was turned on for, can't find a reference to the system timer. Can someone point me in the right direction? Thanks!
Re: MOD54415 TimerTick
I believe there is a Secs variable you can use.
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 TimerTick
I couldn't find a "Secs" variable, but I did find this in utils.h:
From what I gather, it's keeping a tick count, each tick being 1/20th of a second? At least for the MOD5441X platforms... the header didn't specify anything for the MOD5441X family. If I'm wrong, someone please fill me in... thanks!
Code: Select all
extern DWORD GetPreciseTime( void ); // Gets the time tick since system start at a higher
// resolution, depending on the platform: 0.868-us for
// MOD5234/70, and 1.929-us for MOD5282
Re: MOD54415 TimerTick
Nope, that's not what GetPreciseTime does; it gets the sub-tick time from the hardware timer and returns the total hardware counts. This has a lower rollover than simply tracking TimeTick.
'Secs' is the name of the number of seconds since boot, it's declared as a VDWORD, or 'volatile unsigned long', inside 'ucos.c'. It is declared on line 62 of 'utils.h'
-Dan
'Secs' is the name of the number of seconds since boot, it's declared as a VDWORD, or 'volatile unsigned long', inside 'ucos.c'. It is declared on line 62 of 'utils.h'
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: MOD54415 TimerTick
To add to Dan's comment...
TimeTick is the number of ticks since boot.
From utils.h....
extern VDWORD Secs; // Number of seconds since system start
extern VDWORD TimeTick; // Number of time ticks since system start
TimeTick is the number of ticks since boot.
From utils.h....
extern VDWORD Secs; // Number of seconds since system start
extern VDWORD TimeTick; // Number of time ticks since system start
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 TimerTick
Thanks guys - appreciate it. Looks like what I was looking for! Apologies if that was too simple... I completely missed that when I looked in utils.h...