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

AD9361 driver does not update recalculated rf_bandwidth value #822

Open
tfcollins opened this issue Jan 14, 2020 · 4 comments
Open

AD9361 driver does not update recalculated rf_bandwidth value #822

tfcollins opened this issue Jan 14, 2020 · 4 comments
Labels

Comments

@tfcollins
Copy link

The rf_bandwidth cannot be set to any value, and the driver correctly recalculates it based on the current BBPLL and available dividers. However, this is not written back to the actual struct which is read back for the attribute. So you have no idea what the actual value is. This is true for TX and RX.

@tfcollins tfcollins added the bug label Jan 14, 2020
@mhennerich
Copy link
Contributor

The real RX and TX RFBW is a composite of multiple filters. Which filter BW calculation would you use to report?

@tfcollins
Copy link
Author

I would say once the caldiv is determined here https://github.com/analogdevicesinc/linux/blob/master/drivers/iio/adc/ad9361.c#L2473 , use that and the BBPLL to update tx_bb_bw.

@mhennerich
Copy link
Contributor

Can you provide more details on how to derive the exact BW from the target using the caldiv?
For RX which value would you use?

@tfcollins
Copy link
Author

For RX:

  1. Calculate caldiv with caldiv = ceil(BBPLL * ln(2) / (BWrequested * 2.8 * pi))
  2. Get the actual bandwidth with BWactual = BBPLL * ln(2)/(2.8*pi*caldiv)

For TX:

  1. Calculate caldiv with caldiv = ceil(BBPLL * ln(2) / (BWrequested * 3.2 * pi))
  2. Get the actual bandwidth with BWactual = BBPLL * ln(2)/(3.2*pi*caldiv)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants