Post Go back to editing

AD9176 DLL lock failure

Category: Software

Hi

I'm having problems when setting up AD9176 on my custom board. I follow the star-up sequence in the data sheet. DAC PLL  lock status is ok, but DLL lock status is always 0.

Here are my PLL configurations:

CLK_IN = 200M

DIV_M = 1

DIV_N = 6

DIV_VCO = 3

Fdac = (200 / 1) * 8 * 6 / 3 = 3.2G

// ------------------POWER UP------------------
	// SPI_INTFCONFA
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0000, 0x81); // soft reset

	// delay 50us
	for(i = 0; i < 10000; i++)
		__asm("nop");

	// SPI_INTFCONFA
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0000, 0x3C); // 4-wire SPI

	// ACLK_CTRL
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0091, 0x00); // power up clock receiver

	// CDR_RESET
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0206, 0x01); // take PHYs out of reset

	// NVM_LOADER_EN
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0705, 0x01); // en boot loader

	do
	{
		regValue = Ssi_mst_adi_rd_4w(AD9176_SPI_DEV_ID, 0x0705);
	}while((regValue & 0x01) != 0x00);

	// DAC_POWERDOWN
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0090, 0x00); // power on dac0 & dac1
	
// ------------------DAC PLL------------------
	// PLL_BYPASS
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0095, 0x00); // use DAC PLL

	// DACPLL_PDCTRL0
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0790, 0x00);

	// DACPLL_PDCTRL1
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0791, 0x00);

	// DAC PLL require write
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0796, 0xE5);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x07A0, 0xBC);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0794, 0x08);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0797, 0x10);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0797, 0x20);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0798, 0x10);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x07A2, 0x7F);

	// delay 100ms
	for(i = 0; i < 100000; i++)
		__asm("nop");

	// DAC_PLLCTRL7
	regValue = ((intf.DIV_L - 1) << 6) |
			   intf.DIV_N;
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0799, regValue); // L, N

	// DAC_PLLCTRL6
	regValue = intf.DIV_M - 1;
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0793, regValue); // M

	// PLL_CLK_DIV
	regValue = intf.DIV_VCO - 1;
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0094, regValue); // VCO_DIV

	// delay 1ms
	for(i = 0; i < 1000; i++)
		__asm("nop");

	// DAC_PLLCTRL0
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0792, 0x02); // reset VCO
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x0792, 0x00);

	// delay 100ms
	for(i = 0; i < 100000; i++)
		__asm("nop");

	// wait PLL lock
	do
	{
		regValue = Ssi_mst_adi_rd_4w(AD9176_SPI_DEV_ID, 0x07B5);
	}while((regValue & 0x01) != 0x01);

	// ------------------DLL------------------
	// DELAY_LINE_PD
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x000C, 0x00); // power up DLL

	// DLL_UPDATE
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00DB, 0x00);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00DB, 0x01);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00DB, 0x00);

	// DLL_CTRL0
	// Fdac < 4.5G, 0x48 -> 0x49 todo
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00C1, 0x48);
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00C1, 0x49);

	// Fdac > 4.5G, 0x68 -> 0x69 todo
//	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00C1, 0x68);
//	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00C1, 0x69);

	// delay 100ms
	for(i = 0; i < 100000; i++)
		__asm("nop");

	// DLL_READ
	Ssi_mst_adi_wr_4w(AD9176_SPI_DEV_ID, 0x00C7, 0x01);

	// wait DLL lock
	do
	{
		// DLL_STATUS
		regValue = Ssi_mst_adi_rd_4w(AD9176_SPI_DEV_ID, 0x00C3);
	}while((regValue & 0x01) != 0x01);