cancel
Showing results for 
Search instead for 
Did you mean: 

L3GD20 does not send the x y an z acceleration values

NSemrHomeInit
Senior

hello,

I am using the L3GD20 to measure the angles, I have a 10 ms interrupt and in this interrupt service routine I read each time the 6 Output registers,

I am configuring the gyro like this:

GyroscopeDriver.TL3GD20_Reg_Struct.Who_Am_I = I_AM_L3GD20;
	GyroscopeDriver.TL3GD20_Reg_Struct.CTRL_REG1.All = L3GD20_OUTPUT_DATARATE_1|L3GD20_BANDWIDTH_4|L3GD20_MODE_ACTIVE|L3GD20_AXES_ENABLE;
	GyroscopeDriver.TL3GD20_Reg_Struct.CTRL_REG2.All = L3GD20_HPM_NORMAL_MODE_RES|L3GD20_HPFCF_0|L3GD20_HIGHPASSFILTER_ENABLE;
	GyroscopeDriver.TL3GD20_Reg_Struct.CTRL_REG3.All = 0;
	GyroscopeDriver.TL3GD20_Reg_Struct.CTRL_REG4.All = L3GD20_BLE_MSB|L3GD20_FULLSCALE_500|L3GD20_BlockDataUpdate_Continous;
	GyroscopeDriver.TL3GD20_Reg_Struct.CTRL_REG5.All = 0;

The spi Inspector in the following image:

0693W00000aIUXFQA4.pngWe could see that I am trying to read A6 to the AD addresses, in the datasheet 28 to 2c.

Since we have to R/W, there is a bit added to the address thas why I have A8 instead of 28.

These values do not change when I move the board, by the way, I am using the stm32F429 discovery board.

I think the gyro is broken but I am not sure, the STM demo using the gyro is not working properly.

0693W00000aIUeBQAW.pngCould this gyro be broken easily? I have had this board for a long time ago, but I have never used this sensor.

Do I miss something to set to read output values?

Thank you in advance,

1 REPLY 1
Federica Bossi
ST Employee

Hi @NSemrHomeInit​,

Can you move the gyro on the three axis and multiply the value obtained by the sensitivity reported on DS (according to your FS value) and then share me your results?

Also L3GD20 is an obsolete product, if you want to have better performance I recommend you to buy one of our new sensors such as LSM6DSV16X

Let me know.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.