2024-01-25 02:29 AM - edited 2024-01-25 02:47 AM
I'm trying to control a LTC-2668 dac device, through the spi interface. The dac opperates on mode 00 and spi commands are 24 bits long. The chip select pin is manually toggled
The thing is that even though the STM produces the correct output signals, i get no output on the dac device.
Here are some pictures of the produced signals( captured on an analyzer ), spi settings and a snipet of my code.
HAL_GPIO_WritePin(ChipSelect1_GPIO_Port, ChipSelect1_Pin, GPIO_PIN_RESET);
if(HAL_SPI_Transmit(&hspi1,spiCommand , sizeof(spiCommand), 100)==HAL_OK)
{
HAL_GPIO_WritePin(ChipSelect1_GPIO_Port, ChipSelect1_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin, GPIO_PIN_SET);
HAL_Delay(100);
HAL_GPIO_WritePin(GPIOB, LD1_Pin|LD3_Pin, GPIO_PIN_RESET);
HAL_Delay(100);
}
2024-01-25 03:48 AM
Well, if in your opinion the SPI line shows the correct signal, but the DAC (from another manufacturer) does not show any output signal, then probably nobody here in the ST community can help you. The DAC manufacturer's forum would probably be the better place to go?
Regards
/Peter
2024-01-25 06:53 AM
Check that the chip is hooked up correctly.
Check that you're monitoring the pins you think you're monitoring.
Check that the commands you're sending do what you think they do.
2024-01-25 12:37 PM
Schematic?