Well, latency test shows that kernel programming has a latency smaller than a
program in user space.
But, when I'm executing the program that generates my wave, I could achieve a
jitter less then 5us. In kernel programming, I have something like 20us.
But now comes the bad part: if the processor is loaded by other jobs, the
jitter with the user space and kernel programming becomes really high
(something like 80us).
I have tested running the program that generates that wave and another that
computes trigonometric functions, which is the main job for this SBC. That's
why we need the power of 200MHz.
The SBC don't have too much problem for this trigonometric functions, since I
could calculate 10.000 sine, 10.000 cosines and 10.000 tangents in just 5s.
That's much more than we really need.
But, it seems that RTAI version doesn't have a very deterministic behavior. The
program that generates my wave is with the highest priority possible, but the
jitter becomes too much high.
I can really say if it was my mistake or a hardware / software limitation. If
anyone knows anything about how can I improve these results, I would appreciate
:)
By now, I'm considering to buy a very cheap microcontroller just to handle
these waves and communicates with SBC by SPI or RS-232 to receive the commands.
Thanks,
Ronan.
--- In wrote:
>
> Although I am surprised by your finding, I do program exclusively in LXRT.
> In my opinion it seems much more straight-forward to write in user space
> (I don't have 10usec requirements, however).
>
> What do you get when you run the testsuite latency programs?
>
> Most computers I've seen do a better job with the kernel latency
> program... but I don't recall what the TS board does. I'll have to test
> it when I get a chance.
>
>
>
>
>
> "ronis_br" <>
> Sent by:
> 08/05/2009 07:03 PM
> Please respond to
>
>
>
> To
>
> cc
>
> Subject
> [ts-7000] Re: RTAI on TS-7260 and usleep()
>
>
>
>
>
>
> So, the jitter of about 10us that I saw wasn't a oscilloscope problem.
> Unfortunately, it was caused by RTAI.
>
> But I found something very interesting: when I code the same program in
> the user-space, the older was coded to be a kernel module, I could achieve
> a jitter less the 5us!
>
> So I realized what I need right now: to know some good practices in RTAI
> programming :)
>
> Does anyone can give me some advice?
>
> Thanks,
> Ronan.
>
> --- In "ronis_br" <ronisbr@> wrote:
> >
> > Hi everyone,
> >
> > First of all, I would like to thanks everyone who have helped me!
> >
> > I finally could make RTAI works! The problem: I used a wrong gcc version
> to compile the kernel. I was using gcc-3.4.4 but the TS 2.4 kernel must be
> compiled with gcc-3.3. After this, everything works fine.
> >
> > Now I'm testing RTAI.
> >
> > I'm beginner in kernel modules programing so I need some help.
> > I realized that I couldn't use the functions open, mmap and so that TS
> uses in examples to access the registers. Than I found that I can do this
> using the function outb(value, address). Everything works fine, but is
> this the right thing to do?
> >
> > I could construct the wave form that I want, but I'm seeing on
> oscilloscope some oscillation of about 20us that happen randomly. I can't
> really say if it is because RTAI or the oscilloscope problem. I'm
> investigating and when I have a conclusion I'll post here.
> >
> > Some interesting point: to test RTAI, I maid a square wave by software
> (a kernel module). I saw that if the period of this wave is less than
> 50us, approximately, than the system locks :D The wave continues to be
> executing, but there is seems to be no more time to linux tasks, so I
> can't use it anymore by serial.
> >
> > Thanks everyone one more time,
> > Ronan.
> >
> > --- In sjanisch@ wrote:
> > >
> > > I didn't set support for JFFS2. Isn't that more of a file system
> entry
> > > (I'm not a real linux expert by any means... more of a hack than
> > > anything)?
> > >
> > > The flash stuff that I was talking about was in this section
> > > #
> > > # Memory Technology Devices (MTD) for 2k NAND flash
> > > #
> > > CONFIG_MTD2K=y
> > > # CONFIG_MTD_DEBUG is not set
> > > CONFIG_MTD_PARTITIONS=y
> > > # CONFIG_MTD_CONCAT is not set
> > > # CONFIG_MTD_REDBOOT_PARTS is not set
> > > # CONFIG_MTD_CMDLINE_PARTS is not set
> > > # CONFIG_MTD_AFS_PARTS is not set
> > > CONFIG_MTD_CHAR=y
> > > CONFIG_MTD_BLOCK=y
> > > # CONFIG_FTL is not set
> > > # CONFIG_NFTL is not set
> > > # CONFIG_INFTL is not set
> > >
> > > Assuming the 7260 and 7250 use the same flash (which I couldn't tell
> > > you)... this was the missing step in getting the flash to work.
> > >
> > > But I think they do. The TS-7200 lists the flash as NOR flash, while
> the
> > > 7250 and 7260 list NAND flash.
> > >
> > > From what I understand, this is the actual driver that allows the
> kernel
> > > to read the flash...
> > >
> > > I'll send the complete .config file to your gmail account... note that
> it
> > > was for the 7250 rather than the 7260, but the two appear pretty close
> in
> > > terms of specs.
> > >
> > >
> > > wrote on 08/03/2009 01:59:24 PM:
> > >
> > > > With your procedures, I could compile the kernel correctly, but I
> > > > just can do it when I disable the support for CONFIG_JFFS2_FS_NAND.
> > > > But the system cannot boot correctly if I have this option disable
> in
> > > kernel.
> > > >
> > > > When I try to compile it with NAND support for JFFS2 enable, than I
> > > > get the following error:
> > >
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|