Part Number: ADC128S022 Tool/software: Linux Hi, I have configured ADC128S022 with beaglebone black using SPI(IOCTL) but i am not able to read the correct data in SPI_rxbuffer. buf[0] = (channel_num << 3); buf[1] = 0x00; xfer[0].tx_buf =(unsigned long)buf; xfer[0].len = 2; // Length of command to write xfer[1].rx_buf = (unsigned long)buf2; xfer[1].len = 2; /* Length of Data to read */ if (ioctl(file, SPI_IOC_MESSAGE(2), &xfer)<0){ perror("Failed to send SPI message"); exit(0); } rx_data = ((uint16_t)buf2[0] << 8) |(uint16_t)buf2[1]; I have checked SPI with logic analyzer there it is showing 16 clock cyclesis generating two times. But i am expected 16 clock cycles when chip select is low. Can anyone tell me why am getting 16 clock cycles 2nd time.??!! Regards, SAMU
↧