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

Tezuka Firmware for the Pluto source #1580

Closed
Notupus opened this issue Feb 5, 2025 · 3 comments
Closed

Tezuka Firmware for the Pluto source #1580

Notupus opened this issue Feb 5, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@Notupus
Copy link

Notupus commented Feb 5, 2025

Make so sdrpp handles the tezuka firmware compatible with most plutoish devices in such a way to fully utilize the capabilities of the hardware.
Basically #1512
But in issues.

@Notupus Notupus added the enhancement New feature or request label Feb 5, 2025
@AlexandreRouma
Copy link
Owner

You're gonna have to be more explicit as to what exactly has to change to "handle" that firmware.
I'm not reading through hundreds of lines of code poorly commented code to figure it out.

@Notupus
Copy link
Author

Notupus commented Feb 5, 2025

Okay first of all, for tezuka and any firmware you can use rx2 by setting the following reg write
RX1
iio_device_reg_write(_this->phy, 0x00000003, 0x40);
RX2
iio_device_reg_write(_this->phy, 0x00000003, 0x80);
In order for those reg writes to work you need to also set the 1rx 1tx mode based on rx number
iio_device_debug_attr_write_longlong(_this->phy,"adi,1rx-1tx-mode-use-rx-num",_this->rfId+1);
rfid is 0 for rx1 and rfid is 1 for rx2
This seems redundant but its the only way it has worked.

For the 8 bit mode in the tezuka firmware you need to only disable the rx0_q stream and my understanding is that makes tezuka do a iq stream over the 8 bits the i channel.
The rest is using the right volk function for 8bits to 32bits and it resets the buffer on the pluto device if
iio_device_reg_read(_this->dev, 0x80000088, &val); bit 2 is 1 and if so it clears the adc underflow bits, basically this is just another thing that shows stuff in the log and I dont think its critical for sdrpp but a nice to have.

@AlexandreRouma
Copy link
Owner

Ok so this is a complete and utter hack...
Writing registers directly like that is a recipe for disaster when libad9361/libiio expects to be in control of them.

This is gonna be a no from me until it can be done properly through IIO and the firmware takes care of setting these registers/attributes. I'm not risking the stability of the PlutoSDR source module for a tiny number of users on some half baked third party firmware.

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

No branches or pull requests

2 participants