WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tiny Core with Real Time Kernel?  (Read 24398 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Tiny Core with Real Time Kernel?
« Reply #30 on: June 07, 2011, 09:27:35 AM »
If so, then you wouldn't be able to get lower times than 1ms on any distro's RT kernel. 1000Hz is the max in linus' tree. Only Con's allows higher base timing than that, and even then many things break.
The only barriers that can stop you are the ones you create yourself.

Offline Tuftec

  • Full Member
  • ***
  • Posts: 111
Re: Tiny Core with Real Time Kernel?
« Reply #31 on: June 07, 2011, 07:23:51 PM »
I am just reporting what I have observed. My CRO does not lie. I can not get a square wave out of the port pin that I am monitoring with a half period of less than 3.333ms. I am using a call to clock_nanosleep() to establish the port write delay. Even with a time set of only 50000 nanoseconds I still get a 3.333ms delay.

The rt-patch is definetely working as the wave form on the port pin is indeed square as I expect. If I resort back to the standard TC kernel then the wave form moves all over the place with system activity as I would expect.

There must be a setting in the rt-patch config files that have been used with TC (or in the original TC build itself) that establish these timing limits.

Does anyone know where these are and how to change them?

Peter.


Offline Tuftec

  • Full Member
  • ***
  • Posts: 111
Re: Tiny Core with Real Time Kernel?
« Reply #32 on: June 07, 2011, 07:54:32 PM »
It appears from some further investigation that my PC hardware is the problem. No HPET!!! The on board timer hardware is not of the appropriate type to support the higher resolution.
 >:( >:( >:(

Offline mladen

  • Newbie
  • *
  • Posts: 9
Re: Tiny Core with Real Time Kernel?
« Reply #33 on: June 20, 2011, 08:41:25 AM »
After I have worked with many Linux distributions (Debian, RedHat, SuSE, Finnix, Sidux, Slitaz - to mention some of them) and tried -rt patched kernel  attempting to use Linux in real-time applications, I definitively attached to Tiny Core.
I must say many thanks to Robert and Team for their work. They gave us a clean and flexible platform which, among many other things, can effectively be used in solving the real-time problems.

At this occasion I would like to add some suggestions to help using a real-time kernel in the Tiny Core.
Very good support for preemptable rt-patched kernel can be found on the  http://www.osadl.org/ 
Latest stable real-time kernel is 2.6.33.7  with 2.6.33.7.2-rt30 patch.  As can be seen on this site, since kernel 2.6.39 - all real-time stuff will be included in mainline Linux .
Regarding 3.333ms problem, in a standard kernel config file  CONFIG_HZ_1000=y option can be used, which will increase task repetition frequency to 1 kHz.
For experimenting with higher frequency tasks, "ck" patches available on the http://www.kernel.org/pub/linux/kernel/people/ck/patches/2.6/  can be used. Those patches rise CONFIG_HZ up to 10000.
I have succsesfuly tried 2.6.39.1 with hz-raise_max.patch.
 

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Tiny Core with Real Time Kernel?
« Reply #34 on: July 01, 2011, 08:58:10 AM »
You may want to use set_rlimits!

Offline Tuftec

  • Full Member
  • ***
  • Posts: 111
Re: Tiny Core with Real Time Kernel?
« Reply #35 on: July 01, 2011, 09:21:59 PM »
Hi Guys,

After playing around a bit. It appears that Tiny Core with RT should do what I want, even if my hardware is limited to 3.33ms jiffie times. Yes I could change this, but it will be a bit of a compromise performance vs latency. The 3.33ms seems to work ok at present.

TC seems like a great little platform for embedded work.

Well done to all involved.

Peter.

Offline unknown_123

  • Newbie
  • *
  • Posts: 2
happy end :)
http://farm6.static.flickr.com/5094/5563588591_f1abb885be_b.jpg

Hello

I have updated the kernel to full preempt rt, but according to tests, the kernel is not running in real time. Can you help me?