4 ms·
Taking a quick glance over their repos, this looks like a pretty good approach for medium-latency applications. I'm reluctant to stack BEAM atop Linux in an emb
by thenewwazoo 11y ago
Taking a quick glance over their repos, this looks like a pretty good approach for medium-latency applications. I'm reluctant to stack BEAM atop Linux in an embedded application, though, as I found Linux to add too much jitter and latency.
Specifically, I was doing some testing with the AM3359's eCAP module in Erlang, and took a few approaches:
- writing a NIF that consumed kernel interrupts directly, and sent messages
- writing kernel module to expose the eCAP in sysfs and a NIF that select(1)ed the file, and sent messages
- using Erlang to poll the sysfs eCAP fd
None of them worked very well, unfortunately. I gave up when I couldn't get my kernel module working with a version that was supported by Xenomai or RTLinux, and moved onto Cloudozer's bare-metal Erlang VM implementation (which also eventually fizzled).
I like Lumenosys' approach of using libiio and ioctls for this application. I was worried they were going to rely on Linux for the IO (i.e. sysfs) like Nerves does. I also very much appreciate that their work could be reasonably easily adopted on different platforms.