TimeAbsType GetTime(void)

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
nest
Newbie
Posts: 3
Joined: Wed Dec 16, 2009 11:25 am

TimeAbsType GetTime(void)

Post by nest » Tue Apr 05, 2011 10:11 pm

Hello,

does anyone know the size of the data type TimeAbsType? It's 8, 16 or 32 bits?

How can I measure time with GetTime() function? I understand that whit this function the TimeAbsType's returned value is increased a bit with every processor cycle. When the register's bits are full it returns to start from scratch again. I'm right?


Thank you!
Néstor

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: TimeAbsType GetTime(void)

Post by paolo.gai » Wed Apr 06, 2011 8:37 am

The idea is the following:

- we are using an efficient implementation of the EDF scheduling algorithm, which supports timers with wraparound

- giving a fixed size for the time value will end up being inefficient on some machines

- That is, the TimeAbsType is mapped on EE_TYPEABSDLINE which is mapped on the typical size of a timer on the specific architecture.

- If I'm not wrong, we are using a 32 bit free-running timer on dsPIC (2 16-bit timers connected together) (that is explained in the PIC30 arch manual)
Currently http://erika.tuxfamily.org/download/man ... _1_1_9.pdf

- all other architectures typically have a timer register which is the same size of the registers (32 bit on 32 bit MCUs, 16 bit on 16 bit MCUs

I hope it helps...

PJ

Post Reply