This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE7799: command to change frequency

Part Number: AFE7799
Other Parts Discussed in Thread: AFE7769

Hi expert,

Is it correct to use commend setPllLoFbNcoFreezeQec to change frequency? 

Could you please explain for the parameter and how to use them? 

setPllLoFbNcoFreezeQec(int fd, double Fout, double Fref, int ulPll, int ulFbnco)

        /*    ulPll 0-4 for each channel, 5- no channel is selected

                ulFbNco= 0:FBAB,1:FBCD, 2:No channel is selected,3:FBAB band1 NCO,4:FBCD band1 NCO

        */

 Thanks,

Allan

  • Hi expert,

    May I have your help to advise the questions?

    Thanks,

    Allan

  • Hello Allan,

    Please use setPllLoFbNcoFreezeQec() to change the TX LO frequency and also the FB ADC NCO.

    1. INT FD = device number
    2. double Fout = output frequency of the PLL. There are 1x LOs in the AFE7799 (4x LO for AFE7769) and 1 LO for the data converter. You can only change the 4 LOs in the TX and RX LO
    3. double Fref = reference clock to the AFE. Alpha uses 245.76MHz
    4. int ulPLL is the PLL number. Again, there are 1x PLLs in the AFE7799
    5. int ulFbnco = FB NCO frequency

  • In customer’s configuration file, pllMuxModes is set to 0 and lowIF for Tx, FB and Rx is also 0, this means PLL0 is used for all the Tx, FB, and Rx LOs and Tx output frequency for all the Tx channels=PLL0.  When you set ulPll to 0 in the setPllLoFbNcoFreezeQec function, this will change the LO used for all the Tx, Rx channels, and FB NCO.  For example, setPllLoFbNcoFreezeQec(0, 4800, 491.52,0, 4800) will change the Tx output frequency for all the Tx channels to 4800MHz, and Rx channel to 4800MHz, FB NCO to 4800MHz for the FB path. 

  • Hi Kang,

    Customer face some issues that when they execute setPllLoFbNcoFreezeQec(), they would see reporting value is "0" in some of functions e.g. waitForTxQecFreeze();  waitForRxQecFreeze() by reading through SPI on Vivado LA. Would you please advise what might goes wrong? 

    Here is the command how customer issued:

    setPllLoFbNcoFreezeQec(fd, 4800, 245.76, 0, 4800);

    Thanks,

    Allan

  • Allan,

    We had provided guidance since 2020 and have not heard any updates/guidance on their issue. 

    Below are the scripts that Satish had provided back in 2020 in case the function just does not work. You can ask the customer to give this a try to see if the LO and NCO can change afterwards.

    This had been verified numerous times on our side, and would be a good check for Alpha to check on their side.

    device.writeReg(0x15,0x80)
    device.writeReg(0x1D4,0x00)
    device.writeReg(0x374,0x01)
    device.writeReg(0x1D4,0x01)
    device.writeReg(0x374,0x00)
    device.writeReg(0x15,0x00)
    device.writeReg(0x14,0x08)
    device.writeReg(0x5E,0x97)
    device.writeReg(0x28,0x13)
    device.writeReg(0x36,0x13)
    device.writeReg(0x35,0x08)
    device.writeReg(0x51,0x06)
    device.writeReg(0x50,0x40)
    device.writeReg(0x51,0x06)
    device.writeReg(0x51,0x06)
    device.writeReg(0x51,0x0E)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x5E,0x97)
    device.writeReg(0x33,0x03)
    device.writeReg(0x3F,0x0C)
    device.writeReg(0x49,0x01)
    device.writeReg(0x48,0x2F)
    device.writeReg(0x44,0x27)
    device.writeReg(0x43,0x4C)
    device.writeReg(0x43,0x0C)
    device.writeReg(0x42,0x04)
    device.writeReg(0x46,0x00)
    device.writeReg(0x40,0x28)
    device.writeReg(0x2E,0x03)
    device.writeReg(0x2D,0x84)
    device.writeReg(0x2C,0xA0)
    device.readReg(0x00000032,0x00000003)
    device.writeReg(0x32,0x03)
    device.writeReg(0x31,0xC0)
    device.writeReg(0x30,0x00)
    device.writeReg(0x33,0x03)
    device.writeReg(0x39,0x40)
    device.writeReg(0x3F,0x14)
    device.writeReg(0x3F,0x11)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x3D,0x24)
    device.writeReg(0x52,0x10)
    device.writeReg(0x3A,0x08)
    device.writeReg(0x3B,0x30)
    device.writeReg(0x34,0x03)
    device.writeReg(0x34,0x0F)
    device.writeReg(0x34,0x1F)
    device.writeReg(0x34,0x1F)
    device.writeReg(0x34,0x5F)
    device.writeReg(0x5E,0x9F)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x65,0x10)
    device.writeReg(0x3C,0x48)
    device.readReg(0x00000062,0x00000080)
    device.writeReg(0x66,0x0F)
    device.writeReg(0x66,0x03)
    device.readReg(0x00000063,0x00000000)
    device.writeReg(0x14,0x00)
    device.writeReg(0x15,0x80)
    device.writeReg(0x1D4,0x00)
    device.writeReg(0x374,0x00)
    device.writeReg(0x15,0x00)
     

    device.writeReg(0x15,0x80)
    device.writeReg(0x1D4,0x00)
    device.writeReg(0x374,0x01)
    device.writeReg(0x1D4,0x01)
    device.writeReg(0x374,0x00)
    device.writeReg(0x15,0x00)
    device.writeReg(0x14,0x08)
    device.writeReg(0x5E,0x97)
    device.writeReg(0x28,0x13)
    device.writeReg(0x36,0x13)
    device.writeReg(0x35,0x08)
    device.writeReg(0x51,0x06)
    device.writeReg(0x50,0x40)
    device.writeReg(0x51,0x06)
    device.writeReg(0x51,0x06)
    device.writeReg(0x51,0x0E)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x5E,0x97)
    device.writeReg(0x33,0x03)
    device.writeReg(0x3F,0x0C)
    device.writeReg(0x49,0x01)
    device.writeReg(0x48,0x2F)
    device.writeReg(0x44,0x27)
    device.writeReg(0x43,0x4C)
    device.writeReg(0x43,0x0C)
    device.writeReg(0x42,0x04)
    device.writeReg(0x46,0x00)
    device.writeReg(0x40,0x28)
    device.writeReg(0x2E,0x01)
    device.writeReg(0x2D,0xFE)
    device.writeReg(0x2C,0x00)
    device.readReg(0x00000032,0x00000003)
    device.writeReg(0x32,0x03)
    device.writeReg(0x31,0xC0)
    device.writeReg(0x30,0x00)
    device.writeReg(0x33,0x03)
    device.writeReg(0x39,0x40)
    device.writeReg(0x3F,0x14)
    device.writeReg(0x3F,0x11)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x3D,0x24)
    device.writeReg(0x52,0x10)
    device.writeReg(0x3A,0x08)
    device.writeReg(0x3B,0x30)
    device.writeReg(0x34,0x03)
    device.writeReg(0x34,0x0F)
    device.writeReg(0x34,0x1F)
    device.writeReg(0x34,0x1F)
    device.writeReg(0x34,0x5F)
    device.writeReg(0x5E,0x9F)
    device.writeReg(0x3C,0x40)
    device.writeReg(0x65,0x10)
    device.writeReg(0x3C,0x48)
    device.readReg(0x00000062,0x00000080)
    device.writeReg(0x66,0x0F)
    device.writeReg(0x66,0x03)
    device.readReg(0x00000063,0x00000000)
    device.writeReg(0x14,0x00)
    device.writeReg(0x15,0x80)
    device.writeReg(0x1D4,0x00)
    device.writeReg(0x374,0x00)
    device.writeReg(0x15,0x00)

  • setPllLoFbNcoFreezeQec(fd, 4800, 245.76, 0, 4800);

    For this function,  their SW team needs to use ctypes.c_double for the parameters. We are assuming their team aware of this but wanted emphasize.

    For example;

    setPllLoFbNcoFreezeQec(fd, ctypes.c_double(4800), ctypes.c_double(245.76), 0,4800)