STM32f405 spi trouble with LSM9DS0
the i-nemo forum is a little slow hopefully maybe i can get a faster answer here...
I'm trying to interface with the LSM9DS0 and I can't get any coherent information from it. when I try to read the who am I register I get 0x00, but when I read the who am I register and keep the chip select pulled down all the time I get random rubbish.My question is if I perhaps did my spi configuration wrong?RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2 , ENABLE);
SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStruct.SPI_Mode = SPI_Mode_Master;
SPI_InitStruct.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStruct.SPI_CPOL = SPI_CPOL_High;
SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;
SPI_InitStruct.SPI_NSS = SPI_NSS_Soft;
SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_32;
SPI_InitStruct.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_CalculateCRC(SPI2, DISABLE);
SPI_Init(SPI2, &SPI_InitStruct);
SPI_SSOutputCmd(SPI2,DISABLE);
SPI_Cmd(SPI2, ENABLE);
my other thought was maybe my mosi isn't connecting? doest anyone know what happens when you clock in zeros to the LSM9DS0? since 0x00 is a reserved address could that be why if i spam with cs pulled low that I get a response that meas nothing?