Refactor support for Jupiter multi chip sync#713
Open
AlexandraTrifan wants to merge 10 commits intoanalogdevicesinc:mainfrom
Open
Refactor support for Jupiter multi chip sync#713AlexandraTrifan wants to merge 10 commits intoanalogdevicesinc:mainfrom
AlexandraTrifan wants to merge 10 commits intoanalogdevicesinc:mainfrom
Conversation
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
The attribute "multi_chip_sync" will have to be set in a separate thread for each device. With the newer Linux drivers, setting the "multi_chip_sync" attribute, will hold the iio_attr setting process until the device exits the MCS state, or timeout occurs. This is why it is needed to start each attr setting in a separate thread and also check if the thread is alive, after the MCS process should be complete to validate that the MCS was completed successfully. Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Remove the need of moving all channels to calibrated state, before the request for the device to enter in MCS state. The Linux driver will do this automatically, furthermore, it will restore the previous state of the channel before MCS. Simplification for the internal/external sync logic. The Internal sync will only be used when having to synchronize the channels of one system. Because of this, the updated version of the Linux driver, will automatically trigger the MCS procedure, including the internal sync, after a profile is loaded. The external sync will be required when dealing with multiple systems. The information regarding the need to sync one or more systems is defined in the devicetree. The Linux driver exposes the "multi_chip_sync" attribute, which is a bit more special. To know that the MCS was done successfully, one has to wait for the multi_chip_sync attribute setting process to end successfully. The attribute setting of multi_chip_sync only ends after MCS procedure is completed or timeout occurs. For the MCS sync to end, the adrv9002 needs to receive the 6 MCS pulse train. In other words, we need to configure(put in MCS state) each adrv9002 in a separate thread, send the 6 MCS pulse train and wait for all started threads that have put the adrv9002 devices in MCS state to end in success. Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
The updated system functionality will automatically change the sync module functionality from MCS to data transfer sync. So, no need for direct reg writes at the sync address. Removed the loopback functionality which was used for debug purposes. The data capture must be done on separate threads. This reasoning is that after we arm the data paths the DMA's will not be able to transfer data until a trigger event occurs and that in it's current form the capture data mechanism waits until a buffer is captured. So, in the new format we will, arm the ADC/DAC, request a transfer, send a trigger signal in the form of a sync request. To ensure the sync between channels we used the MIMO mode(2RX2TX), more exactly the RX channels will use only one DMA pack cores, rather than, each channel with it's on pack and DMA. Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Sometimes the profile load fails with IO error. I assume the cause could come from the SPI interface. This error arises even if the profile is loaded directly from the SD card on the system. Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Signed-off-by: AndreiGrozav <andrei.grozav@analog.com>
Signed-off-by: AlexandraTrifan <Alexandra.Trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
Signed-off-by: AlexandraTrifan <alexandra.trifan@analog.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Documentation
If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.
Checklist: