LTC2314-14 not working

LTC2314-14 is not working. Only zeros coming on SPI. I am using STM32L431RBT6 as SPI master at 8MHz.

I used the following code:

HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_RESET); // CHIP SELECT PIN 
HAL_Delay(5);

HAL_SPI_Receive(&hspi1,(uint8_t *)&buf,2,10);
HAL_Delay(5);


HAL_UART_Transmit(&huart1,buf,2,5);
HAL_Delay(100);


HAL_GPIO_WritePin(GPIOA,GPIO_PIN_4,GPIO_PIN_SET);
HAL_Delay(5);

Parents Reply Children