How to enable the pedometer functionality in FXOS8700CQ sensor? can someone provide the sample code or reference?

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

How to enable the pedometer functionality in FXOS8700CQ sensor? can someone provide the sample code or reference?

1,852 Views
chiranjeevikinn
Contributor III

Hi All,

we have FXOS8700CQ on board, we wanted to implement pedometer functionality. I checked the application note AN4461, the pedometer is mentioned in the key words but the use case is not available. It would be great if someone can give a reference code or some insight.

Thanks,
Chiranjeevi

0 Kudos
Reply
6 Replies

1,418 Views
david_diaz
NXP Employee
NXP Employee

Hello Chiranjeevi,

I hope all is great with you.

Please note that the FXOS8700CQ device, does not have any pedometer functionality embedded.

In this case, you may create your own application using the embedded functionalities of the device, such as the transient detection mentioned on the application note AN4461.

In order to get more information about the embedded functions of the FXOS8700CQ, please review the block diagram at the Fig. 1 from the datasheet. Besides, you may find sample code at the link below:

FXOS8700CQ - Bare metal example project

 

Finally, I would like to recommend the MMA9553L device.

The MMA9553L device is an intelligent sensor, incorporating dedicated accelerometer MEMS transducers, signal conditioning, data conversion, and a 32-bit programmable microcontroller which can make system-level decisions required for sophisticated applications such as a pedometer.

As a summary, the firmware contained in the device, is a pedometer application.

Please find more information at:

MMA9553L: Intelligent Pedometer Sensor

 

I hope this information helps. Please let me know if you have any further question. I will be glad to help.

Regards,

David

0 Kudos
Reply

1,417 Views
chiranjeevikinn
Contributor III

Hi David,

Thanks for your response.

Is there any sample driver code available for pedometer MMA9553L ?

Thanks,

Chiranjeevi

0 Kudos
Reply

1,417 Views
david_diaz
NXP Employee
NXP Employee

Hello Chiranjeevi,

I am glad to help.

Unfortunately, there is no such driver code for the MMA9553L device.

In this case, you may use the MMA9553L Intelligent Pedometer Platform Software Reference Manual in order to create your own project.

Please let me know if this information helps.

Regards,

David

0 Kudos
Reply

1,417 Views
chiranjeevikinn
Contributor III

Hello David,

I tried to follow the 5.1 chapter from the data sheet to read the version information, but I get erroneous data. Can you please help me in this.

The address is read properly over I2C as 4C

Below is the code snippet:

txBuff[0] = 0x00;
txBuff[1] = 0x00;
txBuff[2] = 0x00;
txBuff[3] = 0x0C;

i2c_smbus_write_i2c_block_data(mma9555l_fd, 0X00, 0X04, txBuff)
i2c_smbus_read_i2c_block_data(mma9555l_fd, 0x00, rxBuff)

Response : 0x0 0x0 0x0 0xc 0x0 0x10 0x0 0x10 0x0 0x1 0x0 0x0 0xaf 0x50 0x4 0x3

Thanks,

Chiranjeevi

0 Kudos
Reply

1,417 Views
david_diaz
NXP Employee
NXP Employee

Hello Chiranjeevi,

I am glad to contact you again.

Back to your first question, there is an example project called 'pedometer' at the new SDK drivers for the MCUXpresso IDE. The project is for the FRDM-K64F with MULT2B evaluation board. The example use the FXOS8700 device.

You may download it at:

Welcome to MCUXpresso | MCUXpresso Config Tools 

In regard with your last request, once the device is awake, you may proceed with the pedometer application configuration as follow:

mma9553l.jpg

Regards,

David

0 Kudos
Reply

1,417 Views
chiranjeevikinn
Contributor III

Hello David,

you are right, but before doing that I was trying to read the version information of the chipset using the following code, but the response is incorrect. Can you please help. I believe this is the sanity check to ensure that the chip is communicating properly.

Below is the code snippet:

txBuff[0] = 0x00;
txBuff[1] = 0x00;
txBuff[2] = 0x00;
txBuff[3] = 0x0C;

i2c_smbus_write_i2c_block_data(mma9555l_fd, 0X00, 0X04, txBuff)
i2c_smbus_read_i2c_block_data(mma9555l_fd, 0x00, rxBuff)

Response : 0x0 0x0 0x0 0xc 0x0 0x10 0x0 0x10 0x0 0x1 0x0 0x0 0xaf 0x50 0x4 0x3

Thanks,

Chiranjeevi

0 Kudos
Reply