Ed
On Wed, Sep 24, 2008 at 6:58 PM, <se...@post.sk> wrote:
> If try it on LPC2148 72MHz then calculate 40us (very very very long
> time) . it's slow to genreate acceleration or deceleration speed for
> axes.
>
Using Linux you have to try harder to get real-time, and <40 us is
probably only possible if you
directly do the calculation in the interrupt vector handler.
I haven't done linux-rt benchmarks on any ARMv7 BTW, I am quite
curious to learn what the Beagle
does.
As a reference I have ~400 us threaded interrupt handler latencies for
ARMv5TE XScale IXP420@533 MHz and ~150 for PowerPC
running Linux 2.6.24 / 25 with -rt patches.
I doubt that any real-time Linux patch will achieve <40 us on embedded
processors, but it might get close.
For axes control, I would strongly recommend to use the ARM Cortex
*M3* processor without Linux, instead
maybe take a RTOS. I get <2 us interrupt latencies there, and ~3.5 us
thread scheduling latencies with RTOSses.
I love my Linux, but like a hammer isn't always the appropriate tool,
Linux likewise is not in this case.
Regards,
--
Leon
On Wed, Sep 24, 2008 at 6:58 PM, <se...@post.sk> wrote:
> yes can use some approximation or table (I use approximation). But
> Beagle board is 600MHz run.
>
Off-topic for the list, but I hate to respond off-list.
Strongly consider the trade-off:
Either:
1) too late with the exact actuator value
2) on-time with a small actuator error
often (2) is what you want for motor control!
So, I do recommend using a (fine-grained) approximation look-up table.
Regards,
--
Leon
> Speed of switching GPIO is fast (few ns) but interesting me a time to
> calculate sqrt a real number.
> If try it on LPC2148 72MHz then calculate 40us (very very very long
> time) . it's slow to genreate acceleration or deceleration speed for
> axes.
> yes can use some approximation or table (I use approximation). But
> Beagle board is 600MHz run.
The Cortex-A8 can calculate the square root of a single-precision
floating-point number in 9 cycles. At 600 MHz, this is 15 ns. If you
need double precision or full IEEE compliance (exceptions, fancy
rounding, etc.), it can take up to 60 cycles (100 ns at 600 MHz).
--
Måns Rullgård
ma...@mansr.com
Cortex has a few unfair advantages over the LPC2148: raw clock speed, and VFP. :)
b.g.
--
Bill Gatliff
bg...@billgatliff.com