Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi guys, so I am trying to read the content of one of my Control Registers but every time I am reading it, without changing value, the SPI_Receive reads different value. I am looking at it with my project leader for more than 10 hours and we just can't figure it out. The sensor I am using is LSM9DS1 and the microcontroller is STM32L432KC. Here is my read function. I am trying to use Transmit and TransmitReceive, but none of them is working. The driver direction is 0x80 / 0x00 base on reading or writing. The CS_Activate and Deactivate are used to enable SPI communication. Driver.data is an uint8_t array of 12 items. The "n" parameter is count of bytes. Any ideas how to fix this?
spi_read