2019-02-09 02:44 PM
I am interfacing to an LSM6DS33 with an ST32F407using the SPI bus. The SPI is set up as follows:
Fully Duplex
Master
Eight Bit
Clock is high when Idle
Data sampled on second edge
Baud Rate Prescale = 64
When I read the Gyro’s X, Y and Z registers they are all always zero. When I look at the SPI signals with a logic analyzer the MISO (SDO) line is always zero. Attached it logic analyze capture of the initialization sequence. I have tried changing the data sampling edge, the board rate and a lot of the write and read code. I tried disconnecting MISO, SDO is still always low.
My code is attached. I have tried several different LSM6DS33 and get the same results.
ST32F407 to LSM6DS33 connections are:
ST32F407 LSM6DS33
Pin 41, PA5, SCL - Pin 2 (SCL)
Pin 42, PA6, MISO - Pin 4 (SDO)
Pin 43, PA7, MOSI - Pin 3 (SDA)
Pin 20, PF7, CS - Pin 5 (CS)
+3.3V - Pin 1 & 16
Gnd - Pin, 8, 9, 10, 11, 15, 12, 13