18

In Linux kernel, enabling PREEMPT_RT will provide bounded latencies and realtime APIs. Besides configuring PREEMPT_RT, the SCHED_FIFO and SCHED_RR policies also need to be selected. And the applications need to set realtime parameters by calling appropriate APIs or by using appropriate utilities. According to a free-electrons training: Realtime in Embedded ...


16

You may be interested in running Xenomai on RaspberryPi. Here you can find a tutorial on how to do this. In a nutshell, Xenomai is a project that created custom Linux kernel (they provide patches that has to be applied to the kernel sources) enabling it to run another kernel (Xenomai core) that is a realtime one. This makes it possible to run Xenomai ...


9

I believe you're looking for systemctl disable systemd-timesyncd.service I wouldn't worry about syslog trashing your SD card (it would take years if not decades), but disabling a service you don't need is generally a good idea. You could also remove NTP completely if you're sure you don't need it: apt-get remove ntp It will be also be beneficial for ...


7

Although the original project only supports Raspberry Pi 1, I have succesfully compiled this fork on a Raspberry Pi 2, and it says to support 3 also. https://github.com/Forty-Tw0/RaspberryPi-FreeRTOS


7

For a general Linux solution pigpio is probably the best you are going to find. It uses DMA to capture the GPIO levels and uses DMA to time-stamp the event time from the 1MHz system clock. The latest samples are reported to the interested processes in 1 millisecond chunks. That means the average latency is about 500µs. However that wouldn't normally be a ...


6

Wyolum mas the aLaMode (I call it the Almond Pi) to fit on top of the Pi in a stackable manner. It has a real-time clock, uses a aTiny 328, feeds of the GPIO Real UART / power and is flashable in various ways. It is great because the Pi can do whatever you want it do , web server/database while the Arduino runs in real-time interrupt.


6

ping to google looks just fine, but what results you get from ntptime ? $ ntptime ntp_gettime() returns code 0 (OK) time d56c8aa0.a60e5194 Thu, Jun 20 2013 4:53:04.648, (.648656024), maximum error 817308 us, estimated error 952 us, TAI offset 0 $ also, for changing your time zone, the recommended way is running sudo raspi-config, then using 4 ...


5

Done it! This is the include section #include <linux/hrtimer.h> #include <linux/sched.h> This is the variables block /****************************************************************************/ /* Timer variables block */ /**********************************************************************...


5

You don't need to hack the kernel. You just need to move the process out of the scheduler queue. #include<sched.h> struct sched_param param; param.sched_priority = sched_get_priority_max(SCHED_FIFO); if( sched_setscheduler( 0, SCHED_FIFO, &param ) == -1 ) { perror("sched_setscheduler"); ...


5

In theory, you could use the OpenGL API to speed things up a bit. There's no implementation of OpenCL for now. You could design your code such that its calculations are a fragment shader according to this answer. You should also take a look at this link. But before you do any GPU magic, take note that this will impose some overhead on the CPU. Only do this ...


4

ARM, the ISA family used by the Broadcom processors on all current Raspberry Pi models, is based on RISC, for which RISC OS is written. RISC OS I think predominated on ARM devices for their first decade, as the same UK based tech company (Acorn) originally designed both ARM and RISC OS. In fact, ARM initially stood for "Acorn RISC machine", and part of the ...


4

Until now I tested the following RTOS without success for raspberry pi 3, that will help someone to not lose time (I wast 3 month) : FreeRTOS, Xenomai, RTEMS, BitThunder, ChibiOS/RT For RISC OS it is not an a RTOS. The only one that I was able to run on raspberry pi 3 until now is Fuchsia OS's kernel (Magenta), but it is in a earlier stage and low ...


4

You've said, "I'm not an expert with Linux systems or the Raspberry Pi, so please thoroughly explain your solution." Fair enough, but if by a "thorough explanation" you expect to avoid any further investment of time beyond this forum post, I feel you will be disappointed :) That said, here goes: GPS is a straightforward solution for obtaining accurate time....


3

I found the solution to my problem. Maybe it helps for others. If you are running RT Kernel on Raspberry pi and having a problem to mount root file system, then add the following option to BOOT/cmdline.txt file. sdhci_bcm2708.enable_llm=0 It has already mentioned and solved in the following post http://www.raspberrypi.org/phpBB3/viewtopic.php?t=39951


3

You can check what preempt is currently "active" by checking the kernel's configuration from /proc/config.gz: CONFIG_PREEMPT=y The configuration option for the rt_patch is: CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y CONFIG_PREEMPT_RT_FULL=y Which doesn't seem to be availabe in the stock kernel. From what I have researched, achievements of the RT_PREEMPT ...


3

I assume you are looking for timing with greater accuracy than 1 jiffy? Have you checked out hrtimers? This section may be of use to you


3

If you want realtime html5 audio on the receiver side, I would definitely recommend a streaming audio solution. CPU, network and memory load is probably much less compared with the solution you described. Icecast in combination with Jack for streaming audio seems a good solution at first sight. Icecast is well documented and works fine for audio output. ...


3

If somebody finds this via search engines: Re-compiling anything won't help at all, don't waste your time on that. It's simply an issue with the Kernel and/or the Raspberry Pi firmware. See here: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=159170


3

The use of UTC time seems to be hardcoded in ds1302 utility. Note the following line: gmtime_r (&now, &t) ; This converts your system time to UTC, before writing it to the DS1302 chip. When the chip is read back, your system time is set to whatever is received from the chip, without any conversion (which frankly looks like a bug). There are two ...


3

You are going to need an internet connection, an OS, (I suggest Raspbian) and a microphone. The first step is to get the microphone set-up. Start by opening a terminal window and running lusb. This lists all of the USB devices connected to the Pi and the microphone should show up. Next the volume for the mic needs to be set to high, so run alsamixer. You ...


2

The best solution I've seen to this is the X10i - Real Time Control Board for Raspberry Pi from Heber. X10i is a universal, powerful and secure real-time controller that permits control over multiple inputs/outputs, via USB, from any PC system. Heber now offers support in many programming languages to make it even easier for programmers, inventors ...


2

There doesn't seem to be any tutorial for building an RT kernel. I'm working on it, but no success so far. Here's as far as I've got: Start by getting the 3.6 source as described here Apply the stock 3.6.11-rt25 patch One line of the patch fails - you have to manually add a line to a makefile Using the .config from the stock raspbian wheezy distro seems ...


2

The OpenMAX API is available on the Raspberry Pi. It handles audio and video encoding/decoding, for example, JPEG. The eLinux wiki lists other APIs usable on the Raspberry Pi:s graphic processor.


2

Restart the NTP daemon All my configs, timezone, internet connection were ok, the daemon was also running but the time was wrong. So this is how I fixed it. sudo /etc/init.d/ntp restart Voila! correct time.


2

Only vaguely related, but since the Raspberry Pi doesn't have an RTC it is handy to install chrony which adjusts the clock's rate based on how much it lags or leads the NTP server. Suppose your clock is 3 minutes slow. Rather than make the system's clock jump forward 3 minutes, chrony will make the clock appear to tick faster than 1 seconds every actual ...


2

As Guzunty mentioned, I've used both pi-blaster and servoblaster for using PWM to control LEDs. The latter includes a kernel module, but the recommended method is now the user-space daemon. Both methods create a /dev/servoblaster file which you can write to change the PWM status. (The advantage of the user-space method is that you don't have to match the ...


2

The timer interrupts come in on interrupt 3. In your example this only shows them coming at a rate of 20 per second. This is due to processor power saving features that reduce the frequency of the timer interrupts when the processor is not busy. In my Pi I see 20 per second much of the time but a couple of times a minute it jumps to 1000/second when there ...


2

Looks to me like Xenomai is meant to be source built. So you should be able to do this. Someone evidently has precompiled binaries for the regular pi. The only issue with this will be the kernel: the old armv6 userland will work on the pi 2, but you still need a different kernel for it. But while armv6 code will run on the pi 2, as noted here (see "How ...


2

I think you should try one of two things. Firstly if you want low latency, you should ditch the USB approach which has more latency then one of these GPIO header based sound cards. This can take you from 3 ms down to 0.5 ms in ALSA latency. Now you have to worry about network latency. For network latency, you can also ditch the server and go directly for a ...


2

I want to know this value because I am using some timers which need precision. The precision of timers is not constrained by HZ or USER_HZ (see man 7 time); you've probably looked at /proc/timer_list by now and recognized there is a nanosecond resolution timer in the kernel, whereas USER_HZ is normally 100 or 1000 and HZ is 100 or 250. There's also ...


Only top voted, non community-wiki answers of a minimum length are eligible