-
Notifications
You must be signed in to change notification settings - Fork 317
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
buffer auto disables some time after calling iio_buffer_enable() with windows client #1076
Comments
I think that if you remove the check in iio_buffer_enable(), you should be able to enable the buffer without creating a block beforehand. In theory this should be fine; Libiio should allow you to create blocks after the buffer has been enabled. As for the auto-disable... it is definitely not a feature. The buffer is disabled when the iio_buffer is destroyed in local.c, so can you check if the buffer gets destroyed after 30 seconds? |
patching libiio is not a soltuion for me, because I don't want to maintain my own version of libiio ^^
I don't close the buffer in any way. Is there a debug feature that allows me to observe whether the buffer is still enabled from outside? Or can I poll the buffer enabled status? |
I did a bit debugging, after around 30s Also when I do But I figured I can enable the DAC output by just doing |
That's not what I was suggesting. We can probably remove this check in Libiio.
Well, that's a solution I guess, but it would be better to figure out what's going on. |
ok, I can try to make a minima example tomorrow. |
I think it's realy like I described. I create a buffer, create a block, enable the buffer |
Did your app set a 30-seconds timeout somewhere? That sounds like a strange value. Libiio typically uses a 1 second timeout value for the local backend, and a 5 seconds timeout value for the network and USB backends. |
It is considered a "protected attribute", because it is used internally by Libiio; On version v0.25 and before, it is set when you call
The new API does allow you to do that, yes. Creating a |
Yes I am calling |
Ok, you said that setting the "enable" manually did not work, I understood that it was still giving you the 30s timeout issue. Is it not the case then? |
yes it still gives me the 30s timeout when I do it from my Windows-WSL system, but the timeout is not there when I do it from my native linux system. |
I have some a custom HDL core connected to the FPGA ad9361 core. I need to enable the DAC channel so that my samples get played out on the DAC. I do this by creating a bufffer, then creating a dummy block (which never gets used) and then calling iio_buffer_enable().
The problem is that after a while, about 30s the buffer auto disables itself. Is this a bug or feature?
I noticed that I have to create a block before calling iio_buffer_enable(), therefore I am creating this dummy block. Is there a cleaner way to just enable a DAC channel, maybe by writing directly to a register or so?
(I am using libiio 1.0 on both sides)
The text was updated successfully, but these errors were encountered: