ADG 714 daisy chain issue

Hello,

I have two ADG714 CMOS 8 SPST analog switches and they are connected in daisy chain configuration.

The schematic shown in the below image. from right, IC7 is connected to the controller and following IC8 connected in daisy chain. 

VDD: 3.3V

VSS: -2.5V

SCLK: 18MHz

Pull up resistor: 4.7k ohms

as you can see in the schematic, SCLK, Synch are connected together and Dout of IC7 connected to Din of IC8.

The problem is, Dout of IC7 doesn't seem to output the correct data. 

Below image shows logic analyzer's timing waveform.
Channel 0: SCLK

Channel1: Din(MOSI)

Channel2: Synch (SPI-Enable)

Channel3: Dout

Could you please tell me where am I making a mistake?

EDIT:

SPI Configuration of STM32F303 controller

void MX_SPI3_Init(void)
{
  LL_SPI_InitTypeDef SPI_InitStruct = {0};

  LL_GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* Peripheral clock enable */
  LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_SPI3);

  LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOB);
  /**SPI3 GPIO Configuration
  PB3   ------> SPI3_SCK
  PB5   ------> SPI3_MOSI
  */
  GPIO_InitStruct.Pin = LL_GPIO_PIN_3|LL_GPIO_PIN_5;
  GPIO_InitStruct.Mode = LL_GPIO_MODE_ALTERNATE;
  GPIO_InitStruct.Speed = LL_GPIO_SPEED_FREQ_HIGH;
  GPIO_InitStruct.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
  GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;
  GPIO_InitStruct.Alternate = LL_GPIO_AF_6;
  LL_GPIO_Init(GPIOB, &GPIO_InitStruct);

  /* SPI3 interrupt Init */
 // NVIC_SetPriority(SPI3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),0, 0));
  //NVIC_EnableIRQ(SPI3_IRQn);

  SPI_InitStruct.TransferDirection = LL_SPI_FULL_DUPLEX;
  SPI_InitStruct.Mode = LL_SPI_MODE_MASTER;
  SPI_InitStruct.DataWidth = LL_SPI_DATAWIDTH_16BIT;
  SPI_InitStruct.ClockPolarity = LL_SPI_POLARITY_LOW;
  SPI_InitStruct.ClockPhase = LL_SPI_PHASE_2EDGE;
  SPI_InitStruct.NSS = LL_SPI_NSS_SOFT;
  SPI_InitStruct.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV2;
  SPI_InitStruct.BitOrder = LL_SPI_MSB_FIRST;
  SPI_InitStruct.CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE;
  SPI_InitStruct.CRCPoly = 7;
  LL_SPI_Init(SPI3, &SPI_InitStruct);
  LL_SPI_SetStandard(SPI3, LL_SPI_PROTOCOL_MOTOROLA);
  LL_SPI_EnableNSSPulseMgt(SPI3);
  SET_BIT(SPI3->CR1, SPI_CR1_SPE);

}

SPI write code:

void setSwitch(){
	uint16_t switchData[1] = {0x5555};
		transmitDataSPI3(switchData , 1);
}


__STATIC_INLINE void transmitDataSPI3(uint16_t *data, size_t dataSize){

	for(size_t i=0 ; i < dataSize ; i++){
		SW_SYNC_GPIO_Port->ODR ^= (uint32_t)SW_SYNC_Pin;
		LL_SPI_TransmitData16(SPI3, data[i]);
		while (SPI3->SR & SPI_SR_BSY);
		SW_SYNC_GPIO_Port->ODR ^= (uint32_t)SW_SYNC_Pin;
	}
}



SPI code is added
[edited by: Fenil at 5:19 PM (GMT -5) on 11 Dec 2020]
Parents Reply Children