Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fw0.32/spike_bug: fix glitch glitch between pushes to cyclic buffers #350

Merged
merged 4 commits into from
Jan 29, 2024

Conversation

Adrian-Stanea
Copy link
Contributor

Use new attribute to control the output of analog out in the time between destroy and create of a cyclic kernel buffer.
The output during this time will be the raw value of the channel.
Also exposed a set function which writes to the raw attr in the analogOut class.

@Adrian-Stanea Adrian-Stanea changed the title Fw0.32/spike bug fw0.32/spike bug Nov 29, 2023
@Adrian-Stanea Adrian-Stanea changed the title fw0.32/spike bug fw0.32/spike_bug: fix glitch glitch between pushes to cyclic buffers Nov 29, 2023
include/libm2k/analog/m2kanalogout.hpp Outdated Show resolved Hide resolved
include/libm2k/analog/m2kanalogout.hpp Outdated Show resolved Hide resolved
src/analog/m2kanalogout_impl.hpp Outdated Show resolved Hide resolved
src/utils/buffer.cpp Show resolved Hide resolved
- Toggling the raw enable flag when a cyclic buffer is destroyed has the
effect of sending the raw value to the ouput untill a new buffer is created.
- This solves a bug where a spike appeared in between pushes to cyclic buffers
because the new one would start with the last sample from the previously deleted buffer.

Signed-off-by: Adrian Stanea <[email protected]>
- when these functions are called the output of the corresponding channel should be set to the specified value
- the change should be reflected in the iio channel raw attribute for dac-a and dac-b

Signed-off-by: Adrian Stanea <[email protected]>
- show how the setVoltage and setVoltageRaw functions work
- Used to test correct implementation of the set functions.
- NOTE: raw_enable attribute should be set to enalbed in order for
the DAC output to be updated with the new value.

Signed-off-by: Adrian Stanea <[email protected]>
For older fw versions, throw an exception if the user tries to set the
raw attribute value.

Signed-off-by: AlexandraTrifan <[email protected]>
@AlexandraTrifan AlexandraTrifan merged commit e4a8865 into master Jan 29, 2024
1 of 13 checks passed
@AlexandraTrifan AlexandraTrifan deleted the fw0.32/spike_bug branch January 29, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants