| SLA Status | Assignee | Support Status |
|---|---|---|
| SLA Closed. | ConradCollins |
Closed |
ADRV9002
Recommended for New Designs
The ADRV9002 is a highly integrated RF transceiver that has dual-channel transmitters, dual-channel receivers, integrated synthesizers, and digital signal...
Datasheet
ADRV9002 on Analog.com
Hi,
I have a few questions regarding Rx Gain Control in Frequency Hopping.
1-) When I set control mode as "PIN" and assign proper GPIOs for Increment and Decrement feature. Does the Pulse applied to those PINs change the Rx Gain Index that is used in FH Frame? Is Increment/Decrement by PIN feature available in FH mode?
2-) User Guide declares that the defined "rxGainIndex" in Hop Table is used in FH Mode. Which Gain Control Mode should be selected in this situation? (gainSetupByPin is False here)
3-) There is FhGainSetupByPinCfg field in FH Configurations. I suppose this feature is used to be able to configure different Rx Gain Indexes for a Hop Frame. It seems the feature is not mentioned in User Guide. Can you please provide detailed information?
The maximum number of Gain Indexes to be loaded to ARM memory is 8. Is there a possibility to increase this number?
Can we use the registers reserved for Tx Attenuation Table Entries for Rx Gain Entries?
Which Gain Control Mode should be selected in this situation?
Is there a timing diagram about when these PINs are sampled?
4-) It is mentioned that AGC Clock could vary with arbitrary sample rate. Is there a way to measure?
5-) Is there any measurement made by ADI regarding MGC PIN mode delay or timing?
6-) Is it possible to use Fast Attack(AGC) and Manual Gain Control in the same time? The priority will be controlled by the user.
Best Regards,
Ahmet Yıldırım
Hi,
I will look into this for you.
Best Regards,
Conrad
Hi Ahmet,
Below is some answers to your questions.
1) Yes, increment/decrement by pin works in FH mode when using manual gain control mode.
2) In real-time processing FH modes, and when AGC is enabled, it is possible to reset the gain value for each frame based on the gain value in the hop table. To enable this, select this check box in the gain control tab in TES:

You can see which modes are pre-process modes and real-time process modes from the 'Frequency Hopping Modes of Operation' table in the user guide.
3) Frequency hopping gain setup by pin config Up to 8 Rx gains and 8 Tx attenuation levels can be loaded to ARM memory and indexed during frequency hopping operation by up to 3 GPIO pins.
This structure provides the configuration data for GPIO assignment and gain/attenuation table loading.
The user can load any valid Rx gain index or Tx attenuation level in the tables.
It's not currently possible to increase the number of gain indexes used in this mode or use the Tx entries for the Rx gain entries.
4) The 'AGC clock' is the same as the 'System clock'. For any profile, you can retrieve the system clock frequency from the TDD enablement Delays tab in TES:

5) We don't have a measurement for this. There should only be a low microsecond delay.
6) It's not possible to use manual gain control and automatic gain control at the same time.
I hope this is clear and if there are any follow up questions, please let me know.
Best Regards,
Conrad
Yes, increment/decrement by pin works in FH mode when using manual gain control mode.
1) User Guide Page 122 states that the device will program the manual gain index for each frame based on the gain information in the frequency hopping table. What should be done to change this into increment/decrement feature? Is calling Rx_GainControl_PinMode_Configure() function enough?
3) What configurations should be set to use this feature? The ones I did so far are:
-- In FhConfig --
.gainSetupByPin = true,
.gainSetupByPinConfig = {
.numRxGainTableEntries = 8,
.rxGainTable = { 255, 235, 215, 195, 205, 225, 245, 255 },
.numTxAttenTableEntries = 8,
.txAttenTable = { 10, 20, 30, 40, 35, 25, 15, 5 },
.numGainCtrlPins = 3,
.gainSelectGpioConfig = { {
.pin = ADI_ADRV9001_GPIO_DIGITAL_07,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
.pin = ADI_ADRV9001_GPIO_DIGITAL_08,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
.pin = ADI_ADRV9001_GPIO_DIGITAL_09,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC} }}
I do not call adi_adrv9001_Rx_GainControl_PinMode_Configure() since I am not going to use Increment/Decrement feature when "gainSetupByPin = true"
And Rx Gain Control Mode is ADI_ADRV9001_RX_GAIN_CONTROL_MODE_PIN
But Rx Gain does not change when I set the assigned GPIOs.
I tried and managed to change the Rx Gain in ADI_ADRV9001_RX_GAIN_CONTROL_MODE_SPI if you need this information.
Also I am unable to export TES C99 code when I enable this in TES. It gives an error. To you face with the same problem?
I have limited amount of time, so I would appreciate if you can help me ASAP.
Best Regards
Hi,
In general, the best way to check this kind of thing is to open the Driver Debugger in TES, perform whatever action you are interested in and then inspect the code to see any relevant API calls.
1) In manual gain control mode, the gain index will be set to the index in the FH table at the start of the frame and then you can use increment/decrement by pin to change the gain index from that starting value. Is that the functionality that you are looking for? If not, please describe what you are trying to achieve.
On a quick inspection of the code, I see this snippet:
adi_adrv9001_RxGainControlPinCfg_t config_57 = {
.minGainIndex = 195,
.maxGainIndex = 255,
.incrementStepSize = 2,
.decrementStepSize = 2,
.incrementPin = ADI_ADRV9001_GPIO_DIGITAL_02,
.decrementPin = ADI_ADRV9001_GPIO_DIGITAL_03};
error_code = adi_adrv9001_Rx_GainControl_PinMode_Configure(adrv9001Device_0, ADI_CHANNEL_1, &config_57);
I expect that this is all that is needed but you should check the full code output to confirm there's nothing else you need for your use case
However, when I try this, I don't see the expected behavior with 'Manual Pin' mode. I can increment and decrement by pin but the gain index is not reset at the beginning of each frame which means that the gain index from the end of the previous frame is preserved (EDIT: Correction, it always starts at 255 as this is the default. See below for further clarification). I'm investigating this bug at the moment. I also notice that this issue doesn't appear in 'Manual SPI' mode. Perhaps you can use this as a workaround for now.
3) I can observe this working correctly in TES in 'Manual SPI' with Automated TDD. I see similar issues to above with 'Manual Pin' mode. However, the TES only simulates the GPIO triggering. If you still see issues, we can try to run a test to ensure this works correctly with real GPIOs.

When I check the driver debugger, I have similar settings to you:
.gainSetupByPin = true,
.gainSetupByPinConfig = { {
.numRxGainTableEntries = 8,
.rxGainTable = { 255, 252, 248, 245, 240, 237, 235, 232 },
.numTxAttenTableEntries = 8,
.txAttenTable = { 12000, 12600, 13200, 13800, 14400, 15000, 15600, 16200 },
.numGainCtrlPins = 3,
.gainSelectGpioConfig = { {
.pin = ADI_ADRV9001_GPIO_DIGITAL_01,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
.pin = ADI_ADRV9001_GPIO_DIGITAL_02,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC}, {
.pin = ADI_ADRV9001_GPIO_DIGITAL_03,
.polarity = ADI_ADRV9001_GPIO_POLARITY_NORMAL,
.master = ADI_ADRV9001_GPIO_MASTER_BBIC} }}
Although, notice that txAttenTable is in mdB. Also note that the GPIOs should be set at the start of the frame.
I see the same issue with the sample code also. This doesn't affect the driver debugger so you can use that to inspect the code.
I will continue to look into these issues. Hopefully, this information is somewhat useful for now.
Best Regards,
Conrad
1) In manual gain control mode, the gain index will be set to the index in the FH table at the start of the frame and then you can use increment/decrement by pin to change the gain index from that starting value. Is that the functionality that you are looking for? If not, please describe what you are trying to achieve.
Not exactly. Instead of using Increment/Decrement I would prefer using "gainSetupByPin=True" Mode which allows me to select from among pre-defined Gain Indexes. But my priority is being able to change Rx Gain as soon as possible. Even during Dwell Time. Is it possible in any of this Modes? Do I always have to set the Rx Gain index before Hop Edge? Am I able to change it in Frame Time, during hop?
However, when I try this, I don't see the expected behavior with 'Manual Pin' mode. I can increment and decrement by pin but the gain index is not reset at the beginning of each frame which means that the gain index from the end of the previous frame is preserved. I'm investigating this bug at the moment. I also notice that this issue doesn't appear in 'Manual SPI' mode. Perhaps you can use this as a workaround for now.
Is there any news about this bug? So you mean we are able to use Increment/Decrement by Pin feature in FH by setting "Manual SPI" mode, right?
Hi,
The issue I mentioned previously is not a bug under further investigation. The documentation around this is slightly misleading. This is a deeper explanation of the gain change modes in FH:
There are two separate and independent modes of operation for manual gain control 'SPI' mode and 'Pin' mode. In FH mode, they behave as follows:
SPI Mode:
Pin Mode:
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).
Please consider these modes and decide on the best method for your use case.
Also, we include an automatic gain control option that automatically sets the gain index based on your settings. This is the best way to control the gain index which I suggest you look into. This is fully detailed in the 'Automatic Gain Control' section of the user guide.
Best Regards,
Conrad
Hi,
I need to configure ADRV9002 for different sample rates, how to change sample rate for ADRV9002 on petalinux image.
Hi,
I need to configure ADRV9002 for different sample rates, how to change sample rate for ADRV9002 on petalinux image.
Hi,
You should create a new question on the following forum: (+) Linux Software Drivers - EngineerZone (analog.com)
Best Regards,
Conrad