This is the mail archive of the ecos-patches@sourceware.org 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]

Re: Initialisation for the AT91... PIT if there is no kernel...


I'm not happy whit this fix.

1. It's possible to init the PIT in the routines. But in this case it should be initalized in the hal_clock_read(), hal_clock_initialize() and hal_clock_reset()... The hal_delay_us() would then work also.

2. hal_clock_reset() also should update the timer-period.

3. The hal_delay_us() in the current implementaion dosn't work korrekt (ticks / 3). Thats because, the PIT can run faster then the CPU in the loop.
The only correct way to messure the time betwin two PIT readings is to subtract the readings in the following way:
dt = t2 - t1;
if (dt < 0){
dt = dt + periode;
}
It's not possible to get the correct time whitout the PIT-periode. So i prefer to use the alternate patch, witch is testet an calculates the delay correct.


Oliver Munz

----- Original Message ----- From: "Andrew Lunn" <andrew@lunn.ch>
To: "oliver munz @ s p e a g" <munz@speag.ch>
Cc: <ecos-patches@sourceware.org>
Sent: Thursday, March 23, 2006 9:03 PM
Subject: Re: Initialisation for the AT91... PIT if there is no kernel...



On Tue, Mar 21, 2006 at 11:49:38PM +0100, oliver munz @ s p e a g wrote:
This Patch fixes problems whit the AT91 PIT, if it should run whitout the
kernel.

This fixes the problem a different way.


Andrew



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