4 ms·
I kinda disagree with you here. You can do bare metal (no OS) and real time (on bare metal or with an RTOS) on a Pi no problem. The difference between the two
by holy_city 8y ago
I kinda disagree with you here. You can do bare metal (no OS) and real time (on bare metal or with an RTOS) on a Pi no problem.
The difference between the two has to do with resources, architecture, and peripherals. Arduino is a low power, low cost, low memory, low speed 8-16bit microcontroller. A raspberry pi is a complete 64 bit computing system with 1-2GB of RAM and the peripherals you'd expect on most desktops. Arduino use Atmega chips while Pis use ARM cores. You need to program in a language supported by gcc for Arduino, but RPis can use the LLVM infrastructure.
- tombert 8y agoYou have me curious; how do I do baremetal on the Raspberry Pi? Which RTOS do you use?
- holy_city 8y agoThey've got a whole stickied thread on the forums about it: https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=72260&sid=abfe9cd3f47665852023ed5469169727 https://www.raspberrypi.org/forums/viewtopic.php?f=72&t=7226... And I think I was totally mistaken on RTOS's, I could have sworn there was a port of FreeRTOS for the RPi but it looks like that isn't really floating around.
- SAI_Peregrinus 7y agoRTAI &/or Xenomai are RTOSes based on Linux, both support ARM. Xenomai has support for the Pi Zero, Pi 2 model B, and Pi 3 Model B[1]. I've never used it, but it's probably easier than porting another OS from scratch. [1] https://gitlab.denx.de/Xenomai/xenomai/wikis/Supported_Hardware https://gitlab.denx.de/Xenomai/xenomai/wikis/Supported_Hardw...
- devwastaken 7y agoBut on a pi, how accurate is the CPU and gpio speed? On an Arduino mega it's guaranteed to be 68.5ns give or take a tiny amount because that's how long an instruction takes for gpio bitbanging registers. This makes it possible to interface with hardware that requires this precision timing. On a pi even if you're at 700mhz constant clock, caching supposedly will mess up your timings for gpio. On top of that I haven't seen much in what the lowest stable delay is for the pi gpio.