This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

2 qns : thread priority level , clock / timer resolution


1) the at91 based processor has 8 levels of interrupt in hardware. In
configtool, under ecoS Kernel -> Kernel Schedulers -> Number of
priority levels; it mentions 32 priority levels. Am i supposed to
decrease this number to 8? What is the correlation b/w *interrupt*
levels supported in hardware and the *priority* levels mentioned in
configtool?

2) I want to measure time difference b/w two interrupts and I use
following code for the DSR.

//DSR Code for interrupt
{
static cyg_tick_count_t oldTicks = 0; //stores clock ticks from RTC
cyg_tick_count_t newTicks = 0; //stores current tick value
system_clockH = cyg_real_time_clock(); //return an handle to rtc
cyg_clock_to_counter(system_clockH, &test_counterH);//convert to
counter to use kernel counter apis
newTicks = cyg_current_time(); //get current tick value
timeInterval = newTicks - oldTicks; //calculate time elapsed since
last interrupt was called
oldTicks = newTicks; //store current tick value
cyg_interrupt_unmask(vector); //allow this 'type' of interrupt to occur again
}

the problem is the resolution of this method. timeIntervel hardly
crosses 0 or 1. The processor runs at 66Mhz. and the setting are:
real time clock numerator = 10^9
real time clock denomintaro = 10^2
real time clock period = 20625

question is what do i do to get microsecond resolution for timeInterval?

Thanks

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]