ADF4371 PTAT reading

Greetings,

we are having issues interpreting the data that comes from reading the device's PTAT ( the last page of "How to Bypass the ADF4371 and ADF4372 VCOs Autocalibration" AN ) . We always get value 85 within all temperature conditions we have tested.

I would like to verify wherter we have missed anything important in the process of ADF4371 init & PTAT reading, therefore I attach:

1. PTAT reading source code:

static uint8_t CWG_read_ptat(void) {
	LOGD(TAG, "%s()\n", __FUNCTION__);

	uint8_t ptat;

	//AN-2005: How to Bypass the ADF4371 and ADF4372 VCOs Autocalibration

	// 1. Ensure that the ADC_ENABLE bit is enabled.
	CWG_write(0x32, CWG_read(0x32) | 0b00000100);

	// 2. Enable the ADC_CONVERSION bit by setting Register 0x0032, Bit 3 to b1.
	CWG_write(0x32, CWG_read(0x32) | 0b00001000);

	// 3. Wait 16 ADC_CLK cycles.
	Sleep(50);//ms

	// 4. Set the VCO_FSM_READBACK bits to 0x05 (skip this step if it is already set).
	if(CWG_read(0x33) != 0x05) {
		CWG_write(0x33, 0x05);
	}

	// 5. Read the VCO_DATA_READBACK[7:0] bits to readback the raw ADC output that corresponds to the chip temperature (RAW_TEMP).
	ptat = CWG_read(0x6E);

	// 6. Disable the ADC_CONVERSION bit by setting Register 0x0032, Bit 3 to b0.
	CWG_write(0x32, CWG_read(0x32) & ~0b00001000);

	// 7. Disable the ADC_ENABLE bit by setting Register 0x0032, Bit 2 to b0, which prevents any spurs generated by the ADC clock. Similarly, the ADC_CLK_DISABLE bit can disable the ADC clock
	CWG_write(0x32, CWG_read(0x32) & ~0b00000100);

	return ptat;
}

2. Program output:

SPI-tool.exe -f 3200000000
Perameter read f arg: 3200000000
Output frequency set to: 3200000000
Set AC2 LED pin:1, read MUXOUT pin:1
Set AC2 LED pin:0, read MUXOUT pin:1
MUXOUT read = 1
Set AC2 LED pin:1, read MUXOUT pin:1
Set AC2 LED pin:0, read MUXOUT pin:1
CHIP_ID: 6
PRODUCT_ID: 1
DAC set to: 1650mV
PTAT = 85
Program END -------------

+ debug messages:

CWG_AC2_LED(LED level:1)
Set AC2 LED pin:1, read MUXOUT pin:1
CWG_AC2_LED(LED level:0)
Set AC2 LED pin:0, read MUXOUT pin:1
ftdi_spi_read(handle:009687B8, register:3 bytes:1, buffer:0061FEED)
SPI Read::hex 06 .
CHIP_ID: 6
ftdi_spi_read(handle:009687B8, register:4 bytes:1, buffer:0061FEED)
SPI Read::hex 01 .
PRODUCT_ID: 1
ftdi_spi_write(handle:009686E0, bytes:2, buffer:0061FEEC)
SPI Write::hex 78 00 x.
DAC set to: 1650mV
CWG_read_ptat()
ftdi_spi_read(handle:009687B8, register:50 bytes:1, buffer:0061FEBF)
SPI Read::hex 04 .
ftdi_spi_write(handle:009687B8, bytes:3, buffer:0061FEBD)
SPI Write::hex 00 32 04 .2.
ftdi_spi_read(handle:009687B8, register:50 bytes:1, buffer:0061FEBF)
SPI Read::hex 04 .
ftdi_spi_write(handle:009687B8, bytes:3, buffer:0061FEBD)
SPI Write::hex 00 32 0c .2.
ftdi_spi_read(handle:009687B8, register:51 bytes:1, buffer:0061FEBF)
SPI Read::hex 0c .
ftdi_spi_write(handle:009687B8, bytes:3, buffer:0061FEBD)
SPI Write::hex 00 33 05 .3.
ftdi_spi_read(handle:009687B8, register:110 bytes:1, buffer:0061FEBF)
SPI Read::hex 55 U
ftdi_spi_read(handle:009687B8, register:50 bytes:1, buffer:0061FEBF)
SPI Read::hex 0c .
ftdi_spi_write(handle:009687B8, bytes:3, buffer:0061FEBD)
SPI Write::hex 00 32 04 .2.
ftdi_spi_read(handle:009687B8, register:50 bytes:1, buffer:0061FEBF)
SPI Read::hex 04 .
ftdi_spi_write(handle:009687B8, bytes:3, buffer:0061FEBD)
SPI Write::hex 00 32 00 .2.
PTAT = 85
Program END -------------
cleanup()
ftdi_spi_close(*handle: 0040B088 [*009687B8])
ftdi_spi_close(*handle: 0040B08C [*009686E0])

Questions:

1) Is there anything we have missed in the code & debug data?
2) Are there any suggestions what we should do before reading the PTAT?

Best regards.

Michal

Parents Reply Children
No Data