FXAS21002 not giving device ID

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FXAS21002 not giving device ID

3,370件の閲覧回数
emoderahul
Contributor II

I'm using FXAS21002C in my board which is configured for I2C communication. The device is responding through I2C when commanded. Whichever mode it is standby or active, it is not giving device ID when I'm reading 0x0c address. It is reading 0x00 . When I'm reading multiple bytes same set of 7 bytes (first value is 0 and then 6 bytes of same junk data) are found to be repeating whichever address I'm selecting. .when I read a particular address it its always 0x00.

  Kindly help..has my device failed and should I replace it? Will device ID be communicated while in standby mode? 

ラベル(1)
8 返答(返信)

2,650件の閲覧回数
anthonyduhamel
NXP Employee
NXP Employee

Hi Rahul,

  1. First of all please check the FXAS21002 I²C address. The value depends on the hardware configuration as below:pastedImage_1.png
  2. Then you can read the WHO_AM_I register as you already did.
  3. If it returns 0xD7 it works!

In both case (Standby or Active mode), you should be able to read any register you want. For write operation, you need to switch to standby then write whatever you want and then go back active mode to apply changes.

I think you need to check with an oscilloscope or a I²C analyser the I²C frames between your master and the FXAS21002. Please share this material with us for a better support!

Thanks,

Anthony

2,650件の閲覧回数
emoderahul
Contributor II

Hi Anthony

  Additional information.

The layout design I have made houses one MAG3110(Magnetometer), one FXAS21002C(gyroscope) and 3 temperature sensors(STCN75) all having  inbuilt I2C interface. Im using Smartfusion2 based Emcrafts development board which is configured to have I2C communication using the IP cores available with Smartfusion2 Libero IDE. 

  The development board works fine with MAG3110 where the I2c communication procedure is identical to FXAS21002C. I2C communication with temperature sensor is also fine. I2C data both in the oscilloscope (which i decoded manually) and the development board says the device ID read is 0x00v(instead of 0xD7) when Im communicating with gyroscope. Some different value comes in the register while in standby mode (data is 0x00) and active mode(0xff). The board is in idle condition while Im accessing FXAS21002C registers.

  While accessing FXAS21002C, 'ACK' bits are coming as expected, which means Im properly addressing the device. But the register content is somehow not as expected.

0 件の賞賛
返信

2,650件の閲覧回数
emoderahul
Contributor II

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.

0 件の賞賛
返信

2,650件の閲覧回数
anthonyduhamel
NXP Employee
NXP Employee

Hi Rahul,

Just to be sure I'm well understanding the situation, let me summarize your issue:

  • you're not able to read the WHO_AM_I register (0x0C)
  • it is the same by using the single ot a multiple byte read operation
  • The active & standby mode does not change something.

It is very difficult to help you without a screenshot of your scope with the I2C frames.

Regarding your testing, my interrogations are:

  • Can you read any other register? Or is it only when your want to reach WHO_AM_I?
  • How can you be sure you well wrote in the configuration registers if you don't read back the content? You"re assuming it enters in Active mode but you must check it by reading CTRL_REG1.
  • I assume it is not a coding issue, because you can communicate with the MAG3110 but I want to verify if the FXAS21002 replies by acknowledge bit during all the I²C query.pastedImage_1.png
  • Can you share your schematic to take a look at? I'm wondering if you connected the RST_B pin to the supply.

Anthony

0 件の賞賛
返信

2,650件の閲覧回数
emoderahul
Contributor II

TEK0003.JPG

Write command with register address selected as 0x0c

TEK0004.JPG

Read command and in response getting 0xff (expected Device Id: 0xD7) from the device register 0x0c.

TEK0002.JPG

The whole plot for the read operation for getting the Device ID:0x07.

0 件の賞賛
返信

2,650件の閲覧回数
anthonyduhamel
NXP Employee
NXP Employee

Hi Rahul,

Thanks for the material. 

  • Regarding your screenshot, can you check the SR condition (Start Repeated condition)?

pastedImage_1.png

I'm not sure to be right, but the small pulse before the SR condition seems strange.

  • The schematic looks good. Just one comment: you don't need several push up resistors for the I²C lines (SDA/SCL). I mean you can use only one for each node, no need to add resistors for each device using the I²C.

Anthony

0 件の賞賛
返信

2,650件の閲覧回数
emoderahul
Contributor II

Hi

1. Even though I'm giving separate independent pull up resistors for each IC, I have wired only one pair for SCL and SDA lines.

2. "I'm not sure to be right, but the small pulse before the SR condition seems strange." For analyzing this, I used a Rasperry Pi board to initiate I2C communication. Here the waveform is clean and there is no small pulse before the SR condition. But the IC is failing to give the desired register content. (including the DEVICE ID). 

3. The Traceability date code on top of the device says - "NCHA". Can you please tell me how to know the date code from this expression.

 4. Unfortunately Im still stuck with the issue. All other components in the board with I2C interfaces have been communicated and calibrated successfully. Is there any timing issues that I need to consider while doing the read operation in standby mode (ie. immediately on Power ON).

0 件の賞賛
返信

2,649件の閲覧回数
emoderahul
Contributor II

I have connected the RST_B pin to 3.3V using 47K as recommended in the data sheet.layout.png

0 件の賞賛
返信