Associate
November 5, 2018
Question
STM32429ZI Dısc1 Gyro wrong data problem
- November 5, 2018
- 2 replies
- 1498 views
I'm tring to write own L3GD20 library. I can read chip ID (but L3G sent to me ffd4 and its partially true). But I cannot read any axis of gyro. Partially gyro always sent to me FF or 00. I'm doing something wrong but I dont know what's wrong. How can I fix this.
L3GD20 header and c file is linked
and last main is :
InitL3GD20(sSPI5,sGPIOC,GPIO_Pin_1);
for(;;){
//SetupCtrlReg1();
ax = GetXYZValueFromL3GD20();
SendStringUsart( USART2, "AxisX:\n\r\t");
SendStringUsart( USART2, "\n\r");
SendFloatUsart( USART2, (ax.AxisX*8.75)/1000);
SendStringUsart( USART2, "\n\r");
_delay_ms(50);
if(CheckL3GD20())
{
GPIO_SetBits(GPIOG,GPIO_Pin_13);
GPIO_ResetBits(GPIOG,GPIO_Pin_14);
}
else
{
GPIO_SetBits(GPIOG,GPIO_Pin_14);
GPIO_ResetBits(GPIOG,GPIO_Pin_13);
}