Severson-Group / AMDC-Firmware

Embedded system code (C and Verilog) which runs the AMDC Hardware
http://docs.amdc.dev/firmware
BSD 3-Clause "New" or "Revised" License
30 stars 5 forks source link

Validate that the `v1.3` codebase still correctly logs data for non-integer sampling rates #404

Open npetersen2 opened 1 week ago

npetersen2 commented 1 week ago

Per this discussion: https://github.com/Severson-Group/AMDC-Firmware/pull/401#discussion_r1648072962

The new v1.3 codebase easily allows non-integer sampling rates for the control task. We have updated the scheduler to handle this by keeping track of time using double type variables. This seems to be working well.

However, the logging system still uses uint32_t types to keep track of time. I have a feeling this will lead to logging issues for some configurations of system sample rates.

Before we release v1.3, we need to make a comprehensive test suite to verify that logging actually works for different settings. For example, set up a sinusoid at 1/10 the control rate in the code, then log it and check the output data still looks as it should. Do this for a range of sample rate settings and log settings.