ADIS16465 SPI communication problem with STM32F103

Hi all,

I am using STM32F103 as a master to communicate with ADIS16465-2, but the data read from the sensor is not correct. 

I tried to read product_ID (addr=0x72) and the result should be 0x4051. Only a few times I can get correct result, and most times I got wrong results like 0x0000, 0x4040, 0x5151.

I checked the signal timing, and it looks correct, as shown in the following figure. Also I attached the reading results I got, and the code of SPI reading.

SPI setting: baudrate=562.5KHz, 16-bit data mode.

Figure: signal timing when the data is correct (0x4051). (Green:=CS, Yellow=SCLK, Red=MO, Blue=MI)

Figure: signal timing when the data is incorrect. (0x4040)

Reading results when master read the product_ID in repeating pattern from ADIS16465:

unsigned int SPI1_Transfer_16b(unsigned short data)
    // Wait until SPI is not busy anymore
    while (SPI1->SR & (SPI_I2S_FLAG_BSY));
    // Write data to be transmitted to the SPI data register
    SPI1->DR = data;
    // Wait until transmit complete
    while (!(SPI1->SR & (SPI_I2S_FLAG_TXE)));
    // Wait until receive complete
    while (!(SPI1->SR & (SPI_I2S_FLAG_RXNE)));
    // Wait until SPI is not busy anymore
    while (SPI1->SR & (SPI_I2S_FLAG_BSY));
    // Return received data from SPI data register
    return SPI1->DR;

unsigned short read_reg_16b(unsigned char addr)
	unsigned short temp = 0;
	temp = (READ_IMU | addr)<<8;
	temp = SPI1_Transfer_16b(0x7200);
	return temp;

unsigned short prod = 0;
void adis_test(void)
        prod = read_reg_16b(PROD_ID);
        //print result to COM13


Would you help with this problem? Any clue will be greatly appreciated.

Thanks in advance,