Received: from 1.136.107.153 ([1.136.107.153]) (SquirrelMail authenticated user sales@ombertech.com) by computernerdkev.heliohost.org with HTTP; Fri, 19 Jul 2019 13:17:55 +1000 Message-ID: Date: Fri, 19 Jul 2019 13:17:54 +1000 Subject: DMA and Real-Time Linux From: "OmberTech" To: gtoal@gtoal.com Cc: pelrun@gmail.com, chrissalo@posteo.de User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit Hello, Great to see the Tailgunner code. I'll look at it properly and give it a try later. Mind wandering, I had a thought that there might be software written for a real-time OS on the Pi to control a 3D printer directly (including all of the timing-critical stepper motor instructions). I instead found a project doing it under Linux by using DMA: https://github.com/Wallacoloo/printipi The author also has DMA examples here: https://github.com/Wallacoloo/Raspberry-Pi-DMA-Example BUT, I think it only actually controls the PWM output, so it's not some secret to performing arbitrary read/write operations with the PiTrex at a specific time. Still, I may well be missing something so I'm mentioning it just in case. On from there, I finally took a proper look into real-time linux kernels, which I've been vaguely referencing every now and again. RTLinux is the original project, and the best summary that I've found is in this old page: http://www.faqs.org/docs/Linux-HOWTO/RTLinux-HOWTO.html#toc3 Modern work all seems to be with "PREEMPT_RT": https://wiki.linuxfoundation.org/realtime/start Not read yet, but looks like an interesting article on the matter: http://www.linux.com/blog/intro-real-time-linux-embedded-developers%20 There are quite a few guides, and even pre-baked kernels (old), for using a PREEMPT_RT patched kernel on the Raspberry Pi, eg. (in rough order of age): https://lemariva.com/blog/2018/07/raspberry-pi-preempt-rt-patching-tutorial-for-kernel-4-14-y https://www.frank-durr.de/?p=203 https://github.com/emlid/linux-rt-rpi https://www.talkunafraid.co.uk/2014/04/real-time-kernels-and-audio-on-the-raspberry-pi/ I'm in a bit of an information overload at the moment, so I'm not ready to draw any conclusions, but I suggest the real-time Linux kernel approach is worth a look before commiting to a pure Real-Time OS. Regards, Kevin Koster.