AnsweredAssumed Answered

AD9361 FMCOMMS3 strange behaviour ~15 seconds after power up

Question asked by taschluter on Feb 17, 2017
Latest reply on Mar 3, 2017 by taschluter

  We are able to power on the device transmit a simple signal and see it perfectly for around 15 seconds. Then something happens and the data that we see looks very strange and continues to look strange until the device is restarted. I am using the master branch of the No OS drivers. Below is an excerpt of how I am starting the AD9361. I have replaced the DMAC core with my own IQ sample stream. I have been able to verify that the dac upack core is sending a pulse to grab samples at the specified sample rate. I have also been able to see the correct LO frequency and see the changes when I adjust the attenuation values. I have not modified the default initialization parameters and instead just changed parameters after the fact.

 

int AD9361FMC_Init(uint8_t data_sel) {
  // NOTE: The user has to choose the GPIO numbers according to desired
  // carrier board.
  int32_t ret = 0;
  uint32_t ensm_mode;
  default_init_param.gpio_resetb = GPIO_RESET_PIN_ZC706;
  default_init_param.gpio_sync = -1;
  default_init_param.gpio_cal_sw1 = -1;
  default_init_param.gpio_cal_sw2 = -1;
  gpio_init(GPIO_DEVICE_ID);
  gpio_direction(default_init_param.gpio_resetb, 1);
  spi_init(SPI_DEVICE_ID, 1, 0);
  printf("GPIO and SPI Initialized \n");
  ret = ad9361_init(&ad9361_phy, &default_init_param);
  if (ret == -ENODEV) {
    return -1;
  }
  printf("AD9361 Initialized \n");
  switch (data_sel) {
  case DATA_SEL_DDS:
    dac_init(ad9361_phy, DATA_SEL_DDS, 1);
    return 0;
    break;
  case DATA_SEL_DMA:
    ad9361_set_rx_sampling_freq(ad9361_phy, 5000000);
    mdelay(1000);
    ad9361_set_tx_sampling_freq(ad9361_phy, 5000000);
    mdelay(1000);
    ad9361_set_rx_lo_freq(ad9361_phy, lo_freq);
    mdelay(1000);
    ad9361_set_tx_lo_freq(ad9361_phy, lo_freq);
    mdelay(1000);
    ad9361_set_tx_rf_bandwidth(ad9361_phy, bw);
    mdelay(1000);
    ad9361_set_rx_rf_bandwidth(ad9361_phy, bw);
    mdelay(1000);
    ad9361_set_tx_attenuation(ad9361_phy, TX1, 90000);
    mdelay(1000);
    ad9361_set_tx_attenuation(ad9361_phy, TX2, 90000);
    //mdelay(40000);
    dac_init(ad9361_phy, DATA_SEL_DMA, 1);
    adc_init(ad9361_phy);
    return 0;
    break;
  default:
    return 0;
    break;
  }
}

 

Is there some step that I am missing or some order that is wrong? Can you think of anything that takes more than a couple of seconds on powerup? When the chip performs powerup calibration does it wait until calibration is done before it starts grabbing samples? I read somewhere in the forums that changing parameters sometimes requires the chip to go through TX Cal again. Through the debug prints it looks like that is the case, however, it does not research the NCO phase offsets and appears to see the old setting. I have also read that sometimes with lower sampling rates the calibration can take longer, which seems to disagree with the reference manual which states that the TX cal has a fixed formula.  Does the sample stream need to be blank for awhile during calibration?

Outcomes