FXLS8471q - use of RST pin for selecting SPI mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FXLS8471q - use of RST pin for selecting SPI mode

跳至解决方案
3,117 次查看
robertholland
Contributor II

I'm testing a prototype but seem to have difficulty establishing SPI mode.

I have an output pin driving the RST pin to control the sequence in software.

My initialisation routine floats SA0/MISO with RST low, then drives RST high for 1ms.

I am monitoring the INT1 pin as described in sections 6.2.3 / 6.2.4 in the data sheet but this sequence seems unclear.

Is there a detailed timing diagram of this reset sequence anywhere?

标签 (1)
标记 (1)
1 解答
2,737 次查看
troydaniel
NXP Employee
NXP Employee

Hi Robert,

Unfortunately it seems a detailed timing diagram for this reset sequence does not exist.

That said, I can provide a couple notes:

  1. The I2C/SPI Auto-detect is the final step in the power-up/reset sequence.
  2. There is no indicator of whether the device is in I2C or SPI mode from the INT1 pin, it only indicates that the reset is complete.
  3. When you drive the reset pin high the voltage must exceed Vdd*0.75 in order to trigger the reset (doesn't seem like this is an issue for you but wanted to be sure).
  4. The period for which INT1 is low is very short (0.5us) so we recommend using rising edge triggering rather than checking the value with a loop (though the loop seems to be working for you).

A slightly better sequence might be:

  • Set up interrupt on rising edge trigger from INT1

  • Drive RST Low
  • wait 2ms
  • Drive RST High
  • wait 2ms
  • Drive RST Low

  • On interrupt trigger- part reset is complete (since you have SA0 floating the part should now be in SPI mode).
  • Continue with initialization via SPI

Using this method your system no longer has to worry about the part timing and can simply continue when the part indicates the reset is complete.

Please let me know if you have any further questions!

Regards,

Troy

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,737 次查看
troydaniel
NXP Employee
NXP Employee

Hi Robert,

I am in the process of trying to find a timing diagram of the FXLS8471 reset sequence.

Do you have a schematic of your prototype board that you can share?

Regards,

Troy

0 项奖励
回复
2,737 次查看
robertholland
Contributor II

Troy,

Thanks for the reply. I've now managed to get this working OK from my micro-controller as follows...

//configure I/O pins

INT1 pin as input with no pull-up.

MISO pin as input with no pull-up.

RST pin as output.

//generate an active high reset pulse

Drive RST low

Delay 2ms

Drive RTS high

Delay 2ms

Drive RTS low.

//monitor INT1 pin

If INT1 pin is low then interface is SPI mode (see *)

Delay 2ms (>boot time of 1ms?)

Verify that INT1 pin is now high.

Continue with initialisation via SPI.

* A timeout value would be useful here. I've just looped 1000 times.

My original difficulty was trying to monitor INT1 pin during the RTS pulse as this sequence was not clear (to me!) from the data sheet.

This seems to work OK but more detailed timing information would be helpful.

0 项奖励
回复
2,738 次查看
troydaniel
NXP Employee
NXP Employee

Hi Robert,

Unfortunately it seems a detailed timing diagram for this reset sequence does not exist.

That said, I can provide a couple notes:

  1. The I2C/SPI Auto-detect is the final step in the power-up/reset sequence.
  2. There is no indicator of whether the device is in I2C or SPI mode from the INT1 pin, it only indicates that the reset is complete.
  3. When you drive the reset pin high the voltage must exceed Vdd*0.75 in order to trigger the reset (doesn't seem like this is an issue for you but wanted to be sure).
  4. The period for which INT1 is low is very short (0.5us) so we recommend using rising edge triggering rather than checking the value with a loop (though the loop seems to be working for you).

A slightly better sequence might be:

  • Set up interrupt on rising edge trigger from INT1

  • Drive RST Low
  • wait 2ms
  • Drive RST High
  • wait 2ms
  • Drive RST Low

  • On interrupt trigger- part reset is complete (since you have SA0 floating the part should now be in SPI mode).
  • Continue with initialization via SPI

Using this method your system no longer has to worry about the part timing and can simply continue when the part indicates the reset is complete.

Please let me know if you have any further questions!

Regards,

Troy

0 项奖励
回复
2,737 次查看
robertholland
Contributor II

Thanks Troy.


Using the rising edge interrupt from INT1 works fine.