[ANN] BaremetalPi.jl 0.1.1

Hi!

Just a small announcement. I just release the version 0.1.1 of BaremetalPi.jl. It should be available in the next few hours.

The greatest change is that I manage to provide functions to transfer information using SPI and I2C that does not allocate at all. This is important for projects that have real time constraints, when the garbage collector maybe need to be disabled.

The next thing I will do is to provide a way to program the PWMs.

Another thing is related to Julia stability in Raspberry Pi Zero W. I installed ArchLinux with a recompiled kernel (using PREEMPT scheduler with 1000 Hz timers), and the latency is just amazing. It is way better than the default Raspbian:

This was an experiment in which the Pi needs to acquire temperature every 300s. The plot shows the difference between the time it should have acquired the temperature and the time it actually acquired it. We have here data from almost 5 days. In the worst case scenario, the latency was lower than 13ms, which is just amazing! Julia proves to be very stable, running all this time without leaking memory.

7 Likes

How do you determine what a good latency is? Milliseconds are technically a lot for computers, but I don’t know enough about the communication protocols at play here to judge your data.

It depends on the application. I want to use the Pi Zero W to control the attitude of a satellite. In this case, and for the type of satellites I am targeting, this is a “slow” process (control actions occurs at 1 Hz). Thus, if I keep my deadlines within 10ms, then I am probably good. Of course this is just a feeling, I still need to test this in a simulation with hardware in the loop.

1 Like