I am using the MMA9555L with the nrf 51422 as master using i2c communication protocol. I have read the datasheet and sent the respective commands as mentioned there for each respective function but i am not getting the specified response from MMA9555L . An uint8_t pedo_read12[21]={0x15, 0x20, 0x00, 0x11, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x50, 0xaf, 0x03, 0x04, 0x82, 0x05,0x00, 0x00} .This is the array sent by me as mentioned in article "pedometer configuration example" in datasheet. Have attached screenshot of response. Any help will be appreciated.
regards
Abhinav
Hello Abhinav,
To start with, I recommend you simply awaken the device and read the pedometer results:
1/ IIC WRITE TRANSACTION :: Starting MB = 00
Write : 12 20 06 01 00 // disable sleep mode (STOPNC) in Sleep-Wake Application
Move the DUT during a few sec to simulate motion
2/ IIC WRITE TRANSACTION :: Starting MB = 00
Write : 15 30 00 0C // query pedometer data-status (12 bytes total)
3/ IIC READ TRANSACTION :: Starting MB = 00, No. bytes to read = 16
Read : 15 80 0C 0C 01 02 00 1F 00 2E 00 00 00 02 00 00
-->Step count is 0x1F = 31d
Then you can periodically loop to step 2/ to get updated pedometer data
Also, I suggest you take a look at this thread: Reading Aggregated Data Legacy Mode on MMA9555L ,
as well as the attached draft document. You will find useful information about the "command / response" communication protocol.
At last, if you still struggle, please provide log of the slave interface traffic to trace back potential errors in the communication with MMA9555L.
Regards, Jacques.