Hi Anthony
Thanks for your reply. I have connected the I2C lines in oscilloscope and have seen the device is responding whenever a communication is initiated. I tried reading multiple times the device ID and since it was not working, I changed the device.
After changing the device too, Im getting similar response. Device ID is coming as zero on power -on
One of the sequence of operation i did im illustrating below.
Sequence 1: (In standy mode)
a. Turned on the device and the device is in standby mode.
b. Initiated a read operation, by first sending a write command with the desired address 0x0c
c. Immediately followed by a read operation. The result expected is the device ID of 0xD7, but Im getting 0x00
Sequence 2: (In active mode)
a. Turned on the device and the device is in standby mode.
b. Initiated a multiple byte write operation starting from the address 0x13 (CTRL_REG1) with the value 0x02, CTRL_REG2 with value 0x00 & CTRL_REG3 with the value 0x01. The device has entered active state(Im assuming)
c. Initiated a read operation, by first sending a write command with the desired address 0x0c
d. Immediately followed by a read operation. The result expected is the device ID of 0xD7, but Im getting 0x00
In both the sequence im getting the value as 0x00. If Im doing independent access of any register, Im getting the value as 0x00. If multiple byte read operation is carried out starting from any register address, then Im getting 0x00 followed by some 6 values of junk data and these 7 data again repeats. All the while I have connected an oscilloscope to see whether I2C communication is OK or not.
In my same board, Im using a MAG3110 IC. In that IC when I do my 'Sequence 1' operation, Im getting the device Id as 0xc4 while reading the address 0x07 as expected. The same code/routine Im using for FXAS21002C as well.
Im pretty stuck at this point, All the help is highly appreciated.