FXLC95000 doesn't read data from FXAS21002

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FXLC95000 doesn't read data from FXAS21002

Jump to solution
4,642 Views
vitaliysiplichu
Contributor III

Hello!
I try to use FXLC95000 with FXAS21002 in KITFXLC95000EVM dev board and MailboxTool, ISF1.1.
I have example project FXAS21002_Project.
I send commands via MailboxTool:

29 00

02 02 00 01 03 - start the flow of sensor data, subscribe_sensor

 

When I use logic analyzer I see that fxlc95000 asks sensor about WHO_AM_I register and gets answer D7. As I understant it's right behavior of programm. But I don't understand why doesn't it start to read data from sensor???

fxlc95000 should start to read data. But there is no any activity on I2C bus after reading of WHO_AM_I register.

I found out that my gyro_app_task stacks in function:
_lwevent_wait_for(&gEventGroup, SENSOR_DATA_READY_EVENT, FALSE, NULL);
and programm doesn't go to next functions of this task. And when I try to read data with command 02 03 00 0A I get zeros instead of sensor data. I don't know how to find the reasons because this function is closed for me and I don't know what is going on inside.

 

Can you explaine to me what does this function do inside and why doesn't it go to next functions? Any ideas?

Labels (1)
0 Kudos
Reply
1 Solution
3,679 Views
aswins
NXP Employee
NXP Employee

Hi Vitaliy,

I apologize for the delay.! I was held last week with another work. Seeing your problem above, Glad that you are able to read WHO_AM_I now!. But I guess since FXAS21002 had a Who_AM_I value change from D6 to D7 more recently. I guess that might be the reason for your problem. Let me send you an updated library file  that you can use. And lets see if it works. Because if you had got the recent FXAS21002 parts then you would have got parts whose WHO_AM_I value is D7.

Thanks

Aswin

View solution in original post

0 Kudos
Reply
8 Replies
3,680 Views
aswins
NXP Employee
NXP Employee

Hi Vitaliy,

I apologize for the delay.! I was held last week with another work. Seeing your problem above, Glad that you are able to read WHO_AM_I now!. But I guess since FXAS21002 had a Who_AM_I value change from D6 to D7 more recently. I guess that might be the reason for your problem. Let me send you an updated library file  that you can use. And lets see if it works. Because if you had got the recent FXAS21002 parts then you would have got parts whose WHO_AM_I value is D7.

Thanks

Aswin

0 Kudos
Reply
3,679 Views
vitaliysiplichu
Contributor III

Hi Aswin!

Excuse me for my persistence. ))) I just need to solve my problem.

Now I know a source of problems. So I will wait for your updated library. I hope it will help me. )))

Vitaliy.

0 Kudos
Reply
3,679 Views
aswins
NXP Employee
NXP Employee

Hi Vitaliy,

                           Hope you tried the updated library that I provided you last week. Does your issue get resolved?

Thanks

Aswin

0 Kudos
Reply
3,679 Views
vitaliysiplichu
Contributor III

Hi, Aswin!

I tried the updated library and everything works now. So I resolved my issue with gyroscope. Problem was with WHO_AM_I register. Thanks! )))

Best regards, Vitaliy.

0 Kudos
Reply
3,679 Views
aswins
NXP Employee
NXP Employee

Hi Vitaliy,

                                        Glad that the problem is resolved now.!

Thanks

Aswin

0 Kudos
Reply
3,679 Views
aswins
NXP Employee
NXP Employee

Hi Vitaliy,

                 No problem at all !. i am done updating the files and it works for me! I am trying to send you the new .lib file to your gmail address. But the mail is not getting delivered. Can you please provide an alternate email address.

Thanks

Aswin

0 Kudos
Reply
3,679 Views
jimmcglasson
Contributor III

Vitaliy,

The lweventwait_for() function is an MQX system call. it simply waits for an event.

The reason it does not come out is that it is never getting the SENSOR_DATA_READY_EVENT.

This is because the sensor initialization is failing and so it never starts running.

And the reason it’s failing is that the adapter that we provided didn’t know about the FXAS21002 (it wasn’t out yet) and only supports the FXAS21000 (which has a WHO_AM_I value of D1)

When the sensor adapter performs its initialization it verifies that the WHO_AM_I value is “correct” so when it sees D7 it returns an error as an unrecognized value.

We are discussing the best way to get you an adapter that is compatible with FXAS21002.

-Jim

3,679 Views
vitaliysiplichu
Contributor III

Hi James!

That is what I thought. I mean functionality of _lwevent_wait_for function. I understood that something is wrong with WHO_AM_I value. But it's strange for me because I use fsl_fxas21002_i2cspi_3D_gyro.lib that Margaret Nadworny gave me. I thought everything should be ok with new WHO_AM_I value in this library.

I will wait for your solution.

Vitaliy.

0 Kudos
Reply