the following code i have written for STM32F103C8T6 for interfacing with AIS3624DQ accelerometer. But while checking , when i read register WHO_AM_I (0x0F) it should return me 0X32 default but it is returning me 0XFF. for any output register it is returning me the same value as 0xFF. please help in this. i know some thing is wrong but i am not getting it.
thanks in advance. the code is as follows.
unsigned int x=0;
GPIO_Digital_Output(&GPIOA_BASE, _GPIO_PINMASK_4); //chip select CS
SPI1_Init_Advanced(_SPI_FPCLK_DIV2, _SPI_MASTER | _SPI_16_BIT | _SPI_CLK_IDLE_HIGH | _SPI_FIRST_CLK_EDGE_TRANSITION | _SPI_MSB_FIRST | _SPI_SS_ENABLE | _SPI_SSM_ENABLE | _SPI_SSI_1, &_GPIO_MODULE_SPI1_PA567);
GPIOA_ODR.B4=0; //chip select low
GPIOA_ODR.B4=1; ////chip select high