-
Notifications
You must be signed in to change notification settings - Fork 318
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
iio_stream_get_next_block causes Invalid argument #1117
Comments
ADIS16460 Datasheet states a few things:
The actual sample rate will be limited by either. (and you didn't spec your SPI rate). |
AFAIR, that driver does not support burst mode which might slow things down a bit. Also, as @rgetz stated, you're not giving any info about your SPI speed. But typically, you won't be able to get 100% of the samples because Linux is not realtime, hence there are latencies inherent to the IIO buffer triggered mechanism... Since you're using a RPI, changing this driver parameter might help you with having better performance. The point is polling in your spi transfers so IRQs don't get in the way. |
@rgetz and @nunojsa, thanks for the fast reply! The attribute spi-max-frequency in the device tree overlay is set to 2000000 (2MHz), does that mean the SPI is operating with 2MHz constantly (random guessing -> No). How can I inspect the set SPI speed, other than with a logic analyzer, is there a way to inspect this on linux? If the speed is set to 2MHz, what does it mean to my sensor reading rate for every channel on the device? Do you have an answer to the other questions, poorly i can't even get the iio_stream running? |
I don't know that part, but looking at the driver, it seems that you need to set up a trigger first. |
I am using a ADIS16460 device on an Raspberry PI connected to an SPI and encountered following problem in my Code:
Getting the error "ERROR: iio:device0: Unable to enable buffer: Invalid argument (22)", when calling iio_stream_get_next_block(dev0_stream).
Since I am very new to this scene, I have got a few questions:
Thanks for the help!
The text was updated successfully, but these errors were encountered: