cancel
Showing results for 
Search instead for 
Did you mean: 

L3GD20 and 072B-DISCO

BNP
Associate

I want to use the L3GD20 gyroscope on my development board. But I didn't understand what I should do and I couldn't find an example on the internet. I know it communicates via SPI, but I could not send or read data. Can you please help me in detail? 

BNP_0-1722525903040.png

 

3 REPLIES 3
TDK
Guru

There is no L3GD20 on that board from what I can tell by the user manual. Do you mean the I3G4250D? Or are you working with an external board with a L3GD20 on it?

If you feel a post has answered your question, please click "Accept as Solution".

Sorry, you are right I mean I3G4250D.  I figured out the problem, the problem was 

hspi2.Init.DataSize = SPI_DATASIZE_8BIT;

SPI_DATASIZE_8BIT was the 4BIT I changed it now I can read the WHO_AM_I value but now I can't read the XYZ axis values. I can get some values but values don't change when I move the sensor.

 

 

TDK
Guru

If you can read WHO_AM_I, that confirms the sensor is hooked up and communicating correctly. You are probably not setting up the chip correctly to do more measurements.

If you feel a post has answered your question, please click "Accept as Solution".