Post Go back to editing

ADRV9003 Tx Attenuation Pin Control with Frequency Hopping

Category: Software

We are trying to use the Tx attenuation pin control mode paired with Frequency Hopping, and are running into issues.

We have successfully implemented the following use-cases:
1. FH-TDD mode, using tx atten spi control mode and the frequency hopping table - we successfully adjust attenuation at the beginning of each hop by writing new entries to the table
2. TDD mode (non hopping), using tx atten pin control mode - we successfully increment/decrement attenuation during an ongoing burst by pulsing DGPIOs

What we would like to do is a combination of the two - configure freq hop mode, but use pin control to increment/decrement attenuation during an ongoing burst. This use-case involves long dwell times at a particular frequency, and we want to compensate for temperature changes during the hop.

We load a FH-TDD profile (same as in use-case 1) and configure out_voltage0_atten_control_mode to 'pin' (as in use-case 2). However, it seems like the frequency hopping table is still applied at the beginning of each hop, and pulsing the increment/decrement pins does not change the output level.

Is there a way to configure our system for such a use-case?

Thank you for your help,

Owen Morrison

Edit Notes

Updated for clarity
[edited by: omorrison at 11:34 PM (GMT -4) on 18 Jun 2026]
Parents
  • Hi Owen,

    I found the EZ discussion below which asks almost the same question and the reply from ConradCollins suggests what you want to do should be possible. Keep in mind, though, that this information is from 3 years ago so there may have been changes in the device firmware or SDK since then.

     ADRV9002 Rx Gain Control in FH Mode 

    If this doesn't help, let me know and I can look into this further for you.

    Best Regards,
    Kevin.G

  • Hi Kevin,

    I had also found that post - it is talking about Rx gain control, while I am asking about Tx attenuation control. Maybe the mechanisms are the same, but it is not clear from that post. Furthermore, the post suggests that what I am attempting to do is possible - great! However, I am still having trouble configuring the XCVR to do so. The post mentions:

    "These modes can't be mixed e.g. it is not possible to set the starting gain index from the FH table (SPI mode) and then increment and decrement via DGPIOs during the frame (Pin mode)."

    I would like to increment and decrement via DGPIOs during the frame. However, no matter what I try, I cannot get the XCVR to behave as I'd like. I either
    (1) load FH tables, then set out_voltage0_atten_control_mode to pin; but the XCVR still seems to respond to the FH table and not the pins
    (2) set out_voltage0_atten_control_mode to pin; then load FH tables, but the XCVR doesn't seem to output anything anymore

    Is my enable sequence wrong? Is there a step that I'm missing? Any advice or further information would be greatly appreciated.

    Thanks,

    Owen

  • Are you using TES with an evaluation platform to test this feature, or are you doing code development for your own system?

    In TES there are four areas that I think need to be configured to control the Tx attenuation via GPIO:

    1. On the GPIO tab, there is a section for Tx1 Attenuation Control.  You need to set the Attenuation Control Mode to Manual Pin and select which pins will control increment and decrement.

    2. Under Configure tab and Carriers tab, there is a section for Separate Gain and Attenuation Tables.  You need to add a check mark to Enable GPIO control of Gain and Attenuation and then supply tables for gain and attenuation.  Example tables can be found in C:\Program Files\Analog Devices\ADRV9001 Transceiver Evaluation Software\Examples\Hop Tables\GainAttenTables.

      The example gain tables appear to be indexes into the larger Gain table that eventually gets shown on the Gain Control tab.  The example attenuation tables, according to TES, are the attenuation in dB.
    3. Also under the Under Configure tab and Carriers tab is a section for Control Hopping by GPIO.  Here you can add tables for Gain / Atten Sequence 1 and Gain / Atten Sequence 2.  Examples of these tables can be found in C:\Program Files\Analog Devices\ADRV9001 Transceiver Evaluation Software\Examples\Hop Tables\Sequences.

      These tables appear to be index sequences for the 8-entry tables set in #2.  When selecting these tables, TES will update the Executed Sequence table just below to show what they do.

    4. After the above settings are set and TES programs the system, on the Transmit tab is a control for Tx Attenuation (dB).  The text box is grayed out but the two up/down arrows are still clickable.  I assume this is because we've set the system to pin mode and that the arrow buttons now increment and decrement the attenuation using GPIOs.

    To view settings 1, 2, & 3 in code form, I would use the Sample Code menu to export sample code to a folder and then look for the settings changed above.  For #4, I expect this to be during runtime setting, so TES needs to be transmitting and you need to use the View menu's Driver Debugger to capture what TES does when you click the up and down arrow buttons.

    I have not tried all of this myself, but I can if needed.  I have an eval platform out in the lab I can setup and test with.  I can also help with the exported Sample Code and Driver Debugger and finding the settings and function calls as well.

  • This is development using an ADRV9003 in our own system. Another detail is we are using the Linux IIO drivers for control/configuration.

    Thank you for the info - I was able to make additions to our device tree in order to use the GPIOs to select the attenuation. I think this matches settings 2&3 in your response. With these settings, I see the gain table exercised at the start of a hop depending on the level of the GPIO.

    adi,fh-gain-setup-by-pin {
            chan1 {
                    reg = <0>;
                    adi,fh-gain-select-pin = <ADRV9002_DGPIO_10>;
                    adi,fh-gain-select-npins = <1>;
                    adi,fh-rx-gain-table = /bits/ 32 <255 187>;
                    adi,fh-tx-atten-table = /bits/ 32 <20000 30000>;
            };
            chan2 {
                    reg = <1>;
                    adi,fh-gain-select-pin = <ADRV9002_DGPIO_11>;
                    adi,fh-gain-select-npins = <1>;
                    adi,fh-rx-gain-table = /bits/ 32 <255 187>;
                    adi,fh-tx-atten-table = /bits/ 32 <20000 30000>;
            };
    };

    However, I'm still unable to adjust the gain during a burst in frequency hopping mode. I also have the increment/decrement pin and step size defined in the device tree:

    adc0_adrv9002: adrv9002-phy@0 {
        tx_pinctrl0: tx-pinctrl@0 {
            adi,step-size-mdB = <200>;
            adi,increment-pin = <ADRV9002_DGPIO_6>;
            adi,decrement-pin = <ADRV9002_DGPIO_7>;
        };
    
        adi,channels {
            #address-cells = <1>;
            #size-cells = <0>;
        
            tx@0 {
                reg = <0>;
                adi,port = <1>;
                adi,dpd;
                enable-gpios = <&gpio 128 GPIO_ACTIVE_HIGH>;
                /* add phandle defining attenuation pin control */
                adi,pinctrl = <&tx_pinctrl0>;
            };
        };
    };
    
    &adc0_adrv9002 {
    	adi,channels {
    		tx@0 {
    			/delete-property/ adi,dpd;
    		};
    	};
    };

    But toggling the increment/decrement GPIOs during operation seems to have no impact. Also, when I try and set
    /sys/bus/iio/devices/iio:device1/out_voltage0_atten_control_mode from 'spi' to 'pin', the value does not appear to change.

    Thank you for your help so far, I think I'm getting closer but still seem to be missing a piece.

  • Providing further info, when I set out_voltage0_atten_control_mode to pin during our setup script (which works with a non frequency hopping TDD profile), the XCVR seems to crash after trying to exercise it upon completion of setup and start of operation...

    dmesg
    [ 1022.491749] adrv9002 spi0.0: [Stream0 error]: Reset might be needed...
    [ 1022.491763] adrv9002 spi0.0: [Stream2 error]: Reset might be needed...

  • Hi Owen,

    I tried to set up an eval platform in our lab for FH + MGC + Pin Control using TES and I could not get it to work.  Similar to what you see, when not FH I can increment and decrement the TX Attenuation using the arrow buttons on TES' Transmit tab.  When I enable FH and have the GPIO controls I mentioned above set, the arrow buttons stop working.

    I need to do some more research and get back to you.

    There are two things I want to mention/share, though:

    • I now think the Control Hopping by GPIO table mentioned above in #3 is something we would observe at runtime in the Driver Debugger and not as an exported configuration in the sample code. TES has a note in this section of the GUI that says "Our FPGA will toggle GPIO pins to set the hop table hop table index, and gain / attenuation table index according to a sequence you upload. In the real use case, you control the pins in real time."
    • Earlier, I did not mention setting the DGPIO pins.  On the Configure > Carriers tab you need define the HOP Pins and the Gain / Atten Index Pins that set the starting gain/attenuation when entering a hop frame.  On the GPIO Tab, you also need to define a pair of pins for increment and decrement for every SSI interface you want to control the gain/attenuation of.  There are a limited number of DGPIO pins to use as well as limitations on which pins can be used where.  For example, I got an error message from TES saying a HOP pin can only be set to DGPIO pins 0-11 and cannot be set to pins 12-15.

    It would help if you had an evaluation platform to test your settings with using TES.  In addition to evaluating the part, TES is a tool for testing if your configurations and what you want to do will work or not.  If TES doesn't allow it or can't do it, it very likely won't work.

  • Hi Kevin,

    Please keep me posted on any updates from your research. Based on both of our findings, it seems like this feature isn't supported, which would definitely be a bummer for us. I played around with TES using Demo Mode, and verified your findings - the arrow buttons didn't work in FH mode (but did in a non-FH configuration).

    Thanks,

    Owen

  • I reached out to our ADRV9002-9006 product group for information.  I think they are suggesting this is only an issue with TES and not the part itself, and that the part should be capable of FH + MGC + Pin Mode.  As a quick test, they suggested I try using Python to increment and decrement the Tx attenuation.  I will set this up in the lab and get back to you on if it works.

  • Hi Kevin,

    Any updates? I'm glad to hear that this feature should be supported by the part, as we're very interested in using it.

  • Hi Owen,

    I heard back from our Apps team in the ADRV9003 product group, and they confirmed that incrementing and decrementing the TX Attenuation does not work during a hop frame when they expected it to.  They've taken note of this issue, and it will be discussed with the developers for future updates to the SDK but there's no estimate of which release it could become available in.

Reply
  • Hi Owen,

    I heard back from our Apps team in the ADRV9003 product group, and they confirmed that incrementing and decrementing the TX Attenuation does not work during a hop frame when they expected it to.  They've taken note of this issue, and it will be discussed with the developers for future updates to the SDK but there's no estimate of which release it could become available in.

Children
No Data