-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add support for AD2S1210 #2
Comments
Progress so far: SDPK1 is not pin compatible with the eval board of 2s1210 so i used the breakout board connected to the eval 2s1210 and jumped wires to the SPI MODE 3 of Mbed seems to be sampling on rising edge and shifing on falling edge? the spi speed was reduced to 100/500khz.. i guess the limit comes from the jump wires im using, Here is the ouput of the iio_info (reading the control register attribute default 0x7E)
|
Im able to read angle and velocity, and the values make sense: iio_info:
iio_attr
|
|
Please see here: https://wiki.analog.com/software/linux/docs/iio/iio_snippets#low_level_register_access_via_debugfs_direct_reg_access Well you would use iio_reg for that. |
iio_reg is working as expected.. thanks. Only issue is that on dumping iio_info, it tries to read address 0x0 which actually puts the chip on bad state (need to power cycle to recover) i had to add a check to return invalid in case of reading a bad address. I made some more cleanups and testing. I was able in fact to read/write SPI at 20Mhz and do 16k sampling rate. Not sure what was going on before that i had to reduce the speed. but seems to be working OK now. The osc ouput is looking nice when removing auto scale and setting reasonable scale. Im getting ready to submit the PR have some questions before pushing:
|
Please add in new resolver directory
The IIO support in No-OS must follow the Linux kernel IIO ABI. https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/iio/types.h#L14 From: https://elixir.bootlin.com/linux/latest/source/Documentation/ABI/testing/sysfs-bus-iio What: /sys/bus/iio/devices/iio:deviceX/in_angl_raw What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_x_raw Then scale and offset are used to convert the RAW value into these units.
How does the scan_element type look like for these channels? OSC typically just looks for the type and then displays the values in accordance with the type. Adding @dbogdan and @mike-bradley as well. |
Perhps its just better if i just the code for review: but i think these are the relevant bits:
BTW i asked this question because it seems that the osc app is not taking into account the offset and scale attribute i set in the channel. its just seems to output the raw value.. is this normal? if not its perhaps some issue with my test.
|
ad4130 _iio is doing what i was asking in question 4: (getting sample for a single channel) ill do this and send the PR to discuss with the actual code. |
Here are the pull request for the no-os and pcf code: no-OS: analogdevicesinc/no-OS#1906 I fixed comments on the no-os driver, i declared the scan value as big endian and removed a byte swap |
Yes it's fine to no read and check the EVB EEPROM contents. As the connections are fly wired, we don't want to the firmware to refuse to run if the user hasn't correctly made the I2C connections as well. If at some point in the future there is a new Arduino EVB (say) that doesn't need fly wires, we can look at adding the eeprom check back in, but not in scope here currently at least.
16000 is fine for this part. the signal integrity due to the fly wires is likely the limiting factor for the SPI clock rate.
@mphalke - can you comment here?
If I follow the question, is the ask here in terms of providing AD2S1210 No-OS function calls for reading back 1 or more channels of data, e.g. position, velocity etc.... such that only channels enabled/request by the host are read back to save time transferring/acquiring the data, and potentially allow higher throughput on the enabled chanenls? If so that makes sense, some IIO devices do support and enable that sort of function, whereas others do not or can not. In some cases (AD7606x for example) the device always reads 8 channels and returns the 8 channels in order, so less benefit there.
the tests folder contains the pytests that we run as part of ci testing of the firmware to check basic functionality. The tests to date tend to be simple go/no go tests, or DC inputs. We've not done performance level testing, but with the MX1002 available not, that is likely to change. |
sw wise: in ad738x why some things are initialized in init_system (app_config.c) like gpio_trigger_Init but others in iio_initialize (ad738x_iio.c) like init_pwm_trigger? |
Add support for the serial interface to the AD2S1210 using Mbed.
Tasks
Dependencies
The text was updated successfully, but these errors were encountered: