FXLS8471Q in SPI mode, reset pin to ground

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

FXLS8471Q in SPI mode, reset pin to ground

1,667 Views
francisbk
Contributor I

Hello all, I am trying to connect fxls8471q accelerometer in SPI mode . But I am not able to read the device ID through SPI.

In software, I am configuring the MOSI line as Open Drain for floating at the first sequence. 

I am trying to read the who am I register using the following commands as

sending data bytes in SPI 0x0D, 0X00,0X00

Receiving data bytes as 0x00,0x00,0x00

SPI receive interrupt configured as receive timeout.

I need some help regarding the configuration of the FXLS8471q in SPI mode.

I found some tags conveying that with

reset high

make MOSI as floating 

reset low.

But in our design we connected reset pin to ground.

Please check the configuration of pins below.

pin configure

  1. VDDIO(pin-1) and VDD(pin-14) -  3.3V
  2. BYP(pin-2)-  connected as ground using 0.1uf capacitor.
  3. CRST/NC(pin-8)- connected as ground using 0.1uf capacitor.
  4. RES(pin-3) and RES1(pin-13)- connected to ground.
  5. GND(pin-5) and GND(pin-12)- connected to ground.
  6. CS(pin-10)- chip select.
  7. MISO(pin-7)- Master In Slave Out.
  8. MOSI(pin-6)- Master out slave In.
  9. SCLK(pin-4)- select as clock.
  10. INT1(pin-11)- interrupt 1.
  11. INT2(pin-9)- interrupt 2.
  12. NC(pin-15) 

Is there any possibilities of configuring fxls8471q in SPI mode without the usage of reset pin.

0 Kudos
Reply
3 Replies

1,239 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi Francis,

Can you tell us what Matlab toolbox are you using for configuring the MCU peripheral to talk with  fxls8471q?

Reading the datasheet https://cache.nxp.com/docs/en/data-sheet/FXLS8471Q.pdf it seems that the RST is not requested for a successful communication via SPI.

Best regards,
Daniel

0 Kudos
Reply

1,239 Views
francisbk
Contributor I

Hi Daniel,

Thanks for the reply,

I am not using any Matlab Toolbox for Configuring the MCU to talk with fxls8471q, I implemented the code, and checking directly with the fxls8471q using oscilloscope.

The following are the Observations of SPI lines with the Oscilloscope,

MOSI - the data which is transmitted, is observed in Oscilloscope.

SCL  - the clock pulses are toggling properly, when the SPI communication is initiated.

CS   - the Chip select pin goes Low and high when the data is getting transmitted.

The above three lines are working as per the software which is implemented.

MISO -  The MISO line is continuously in floating, the voltage variation is between 3 V to 2.2 V.

              I can able to see almost nearrly 8-9 High to Low transistions in the MISO line for 500 micro seconds.

Please find the below snapshot of Oscilloscope image of MISO line.

     FXLS8471Q_MISO_LINE.jpg

Let me know any issues with the configuration of SPI, which leads to this behavior of  MISO pin.

Thanks,

Francis B K 

0 Kudos
Reply

1,239 Views
constantinrazva
NXP Employee
NXP Employee

Hello francisbk‌,

Unfortunately I don't have an fxls8471q for now, so I can't replicate your problem. But I took a look at what you described and you are right - after sending 0x0D,0x00,0x00 (requesting a read from WHOAM_I register) you should be getting something on MISO (like 0xFF,0xFF,0xNN - value of that register). This might be a problem with the mode auto detection (i2c/spi).

Capture.JPG

As you know, when you want to use SPI interface mode, you must ensure that SA0/MISO pin is floating and no other device drives this pin during the 1ms period after a hard/soft reset or powerup event. But there is one more catch - according to the errata found here , following a soft-reset command certain parameters do not get updated correctly from NVM, causing inaccurate data output and incorrect WHO_AM_I register content. This is a known issue with the SPI mode (I2C should work properly). Unfortunately for you, the workaround for this is avoiding using a soft reset, and using a hardware reset instead.

You can try to soft-reset it by setting CTRL_REG2[rst] = 1, where rst is the 6th bit, but if this does not do the trick, you might have to change something in your setup so you can issue a hardware reset.

Hope this helps,

Razvan.

0 Kudos
Reply