I use raspbian for embedded systems like microcontrollers, I make several sensors and display them on an LCD, does the Rasbian operating system also have a real time operating system?
Asked
Active
Viewed 3,647 times
2
-
1What exactly are you asking for? – Nico Haase May 17 '19 at 14:08
-
Do you need a true RTOS for that application - what are teh consequences of missng a deadline by a fer milliseconds if all you are doing is displaying data. More of an issue with PRi with respect to connecting sensors are its rather limited I/O. If your I/O is connected through some sort of I2C or USB device, it is already _not_ real-time. – Clifford May 17 '19 at 18:25
-
can i say that raspi is hard rtos? because a soft rtos has small jitter – ibnukhak May 18 '19 at 09:50
-
No you cannot, because it is not - it is Linux. My point is if the only thing you are doing with the sensor data is displaying it for a human to read, jitter may not be an issue, and that for some inputs, the _hardware_ is not deterministic either. – Clifford May 25 '19 at 18:17
-
If you really must than https://www.raspberrypi.org/forums/viewforum.php?f=72 is a good place to start. There are discussions of FreeRTOS and ChibiOS/RT there, and even the [PREEMPT_RT patch](https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=206750&p=1462645&hilit=rtos&sid=aed1a7ba1e76ac68ad1210e6c446d686#p1462645). Ultimately however, the RPi is not ideally suited to hard real-time. A microcontroller with a true RTOS _communicating_ with the RPi for networking, and UI etc. might be a better architecture. – Clifford May 25 '19 at 18:23
-
@NicoHaase I am working on projects with Arduino using the freeRTOS library, but I am turning to Raspi because I see it superior – ibnukhak May 27 '19 at 15:59
-
@Clifford I tried using the free RTOS library on Arduino to read the sensors, and I connected Arduino to Raspi using USB, I want to take data on Arduino using Raspi with imported serials, is this impossible? – ibnukhak May 27 '19 at 16:10
-
@ibnukhak I am not really sure what you mean by "imported serials", but "possible" certainly. Really though if you have a new question, best post as a separate question. – Clifford May 27 '19 at 18:06
-
in Raspi there is Python Idle, I use the Python serial library to retrieve data from Arduino that reads the sensor using freeRTOS Arduino, sorry I'm new here so it's not so good using Stackoverflow @Clifford – ibnukhak May 27 '19 at 23:39
1 Answers
4
Raspbian is a distribution for Raspberry Pi built on top of Debian Linux, which is a general purpose operating system, as opposed to a real-time operating system. There are ways to run a RTOS on RPi, but it is rather waste of a powerful board like RPi. A more suitable way to achieve real-time behaviour would be to use the PREEMPT_RT patch for the Linux kernel.

Bora
- 451
- 2
- 5
-
so with that I have run a embedded system with operating systems based? not real-time operating systems? because I use raspbian – ibnukhak May 18 '19 at 09:48
-
Raspbian is not a RTOS. Please read: https://en.wikipedia.org/wiki/Operating_system#Types_of_operating_systems – Bora May 23 '19 at 08:02
-
1PREEMPT_RT does not make Linux a true RTOS, but may be suitable for a large range of applications nontheless. Its main benefit is that it achieves _better_ real-time performance while maintaining all the support and software ecosystem available for Linux. Whether it is actually a _"more suitable way"_ than running an RTOS depends on your real-time latency constraints. If they are very critical _and_ you need all that Linux provides or enables, then a microcontroller running an RTOS communicating with a RPi via GPIO, SPI, I2C or Ethernet for example may be "more suitable". – Clifford May 25 '19 at 18:07