AnsweredAssumed Answered

ADIS16405 communicating with STM32F103CBT6 using SPI

Question asked by ZiyuanWang on May 29, 2013
Latest reply on Jun 10, 2013 by NevadaMark

Hi,

Thanks for your attentation. As the topic says, I have some problem. I have connected ADIS16405 and STM32 just as the datasheet provides except for the DIO1 pin floating. The problem is I can only get 0xFFFF when either reading product ID or ZACCL_OUT.

I have tried to communicate with the method of direct SPI and simulated SPI, but neither works. I can observe useful and right singals from the SCLK pin, the DIN pin and the CS pin, but not the CS pin by oscilloscope.

Here's how I read things using the ST official firmware functions.

int16_t ADIS16405_Read(int16_t RegAddress)

{

          GPIO_ResetBits(GPIOA, SPI1_NSS);

          while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET);

          SPI_I2S_SendData(SPI1, RegAddress);

 

          while(SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET);

          GPIO_SetBits(GPIOA, SPI1_NSS);

          return SPI_I2S_ReceiveData(SPI1);

}

I have gotten the code of ADuC7026 communicating with ADIS16405 using a simulated way. I tried to adapt it, but it still doesn't work anyway.

This problem seems to have annoyed me for more than a week. Can anybody help me? Any response would be appreciated!

Regards,

Ziyuan

Outcomes