Hi,
I am using stm32g4 with AD9951 (I am using 400Mhz crystal), I can read and write back all the registers correctly, correctly disable and enable the SYNC_CLK, and measure it to be exact 100MHz (400MHz/4).
The problem I am having is I cannot get any output signal.
this is my schematic:

I have tried:
measuring the signal without transformer as well.
changing the Rset to higher value to lower full-scale current, hence lowering the voltage at dac pins.
this is how I am configuring the registers.
HAL_StatusTypeDef Ad9951_init(void)
{
// Reset the AD9951
HAL_GPIO_WritePin(AD99_RESET_GPIO_Port, AD99_RESET_Pin, GPIO_PIN_SET);
HAL_Delay(10);
HAL_GPIO_WritePin(AD99_RESET_GPIO_Port, AD99_RESET_Pin, GPIO_PIN_RESET);
HAL_Delay(10);
// Power on (all components active by default)
HAL_GPIO_WritePin(AD99_PD_GPIO_Port, AD99_PD_Pin, GPIO_PIN_RESET);
HAL_Delay(10);
// Reset SPI controller of AD9951
toggle_IO_SYNC();
uint8_t reg_val[5] = {0};
// Configure CFR1 to use 2-wire SPI, SDIO as input, all components enabled
reg_val[0] = 0x00; // Write instruction for CFR1 (0x00)
reg_val[1] = 0x00;
reg_val[2] = 0x00;
reg_val[3] = 0x02; // SDIO input only
reg_val[4] = 0x00; // All components enabled
HAL_SPI_Transmit(&hspi2, reg_val, 5, 500);
toggle_IOupdate();
// Configure CFR2
reg_val[0] = 0x01; // Write instruction for CFR2 (0x01)
reg_val[1] = 0x00;
reg_val[2] = 0x00;
reg_val[3] = 0x00;
HAL_SPI_Transmit(&hspi2, reg_val, 4, 500);
toggle_IOupdate();
// Configure ASF register
reg_val[0] = 0x02; // Write instruction for ASF (0x02)
reg_val[1] = 0x3F;
reg_val[2] = 0xFF;
HAL_SPI_Transmit(&hspi2, reg_val, 3, 500);
toggle_IOupdate();
// Configure ARR register
reg_val[0] = 0x03; // Write instruction for ARR (0x03)
reg_val[1] = 0x00;
HAL_SPI_Transmit(&hspi2, reg_val, 2, 500);
toggle_IOupdate();
// Set FTW register for 24 MHz output
reg_val[0] = 0x04; // Write instruction for FTW (0x04)
reg_val[1] = 0x0F;
reg_val[2] = 0x5C;
reg_val[3] = 0x28;
reg_val[4] = 0xF6;
HAL_SPI_Transmit(&hspi2, reg_val, 5, 500);
toggle_IOupdate();
// Configure POW register
reg_val[0] = 0x05; // Write instruction for POW (0x05)
reg_val[1] = 0x00;
reg_val[2] = 0x00;
HAL_SPI_Transmit(&hspi2, reg_val, 3, 500);
toggle_IOupdate();
// Read a register to verify programming
reg_val[0] = 0x82; // Read instruction for CFR2 (0x01)
HAL_SPI_Transmit(&hspi2, reg_val, 1, 100);
uint8_t rec_data[5] = {0};
HAL_SPI_Receive(&hspi2, rec_data, 2, 100);
toggle_IOupdate();
return HAL_OK;
}
Edit Notes
updated the code with correct comments. and suggestions[edited by: embedd at 12:15 PM (GMT -5) on 17 Nov 2025]