Where did task acceleration fifo full task go?


I’m working on modifying the ruuvi firmware to perform certain analysis of the accelerometer data.

So, as a first step I wanted to implement this https://ruuvi.com/motor-vibration-monitoring-with-bluetooth-sensor-ruuvitag/. but based on the latest firmware.

However, I note that the way that was implemented was to modify the task_acceleration_fifo_full_task function, which was called every time the FIFO was called.

But looking through the repository history I see that said function was removed, and I haven’t been able to ascertain if it was refactored to another area of the code base, or removed completely, or indeed how you go about reading the accelerometer FIFO when it is full.

So how do I go about replicating that functionality from the original article, but with the current firmware as the base?


Reading the full FIFO is a waste of energy in normal Ruuvi Firmware, so we removed the functionality.

I recently did a quick PoC with FFT of acceleration data, it has logic to start collecting the data to FIFO, process FIFO samples as they come and then turn off FIFO once done. Commit is here: Add FIFO Start/stop logic · ojousima/ojousima.acceleration_bcast.c@7e4ec61 · GitHub

In short, you’ll want to enable GPIO interrupt on nRF52, enable FIFO, enable FIFO GPIO interrupt on LIS2DH12. Once FIFO interrupt fires, read and process data.

To stop working with FIFO data, disable interrupt on LIS2DH12, disable FIFO and disable FIFO GPIO interrupt on nRF52 .

Relevant functions in commit are app_sensor_fifo_collection_start, app_sensor_fifo_collection_stop and on_accelerometer_fifo_isr