cancel
Showing results for 
Search instead for 
Did you mean: 

ASM330 SPI robustness

VikasP
Associate

We are planning to use ASM330LHH at a distance of about 1m from the MCU to which it will interface for supplying the gyro data in an automotive application. SPI will run at around 1MHz. Can we interface directly through SPI, or should we integrate the sensor with anoother MCU and transmit the data to the main MCU over CAN? Are there any chances of data corruption over SPI due to EMI etc? Should we use any special wiring?

4 REPLIES 4
RhSilicon
Lead

https://www.analog.com/en/technical-articles/isolated-spi-communication-made-easy.html:

While the SPI communication method is generally suitable for distances up to approximately 10 m, to bridge longer distances, a repeater is often needed because of attenuation due to the increased line resistance of long cables.

TDK
Guru

It depends on how much you care about the data. Is it okay if samples are lost or data is corrupted? If not, probably want a robust solution. LVDS or other differential signal will certainly be more robust.

Also depends on environment. Long wires will act as antennas and pick up noise. Most automotive systems use CAN, I would do the same if it were me.

If you feel a post has answered your question, please click "Accept as Solution".
Chubs
Associate III

For any Offboard SPI communication above 1Mhz Clock frequency & beyong 0.5m cable length, always prefer a Differential signaling. Some super cheap options are: AM26C31/32 differential driver (31) & receiver (32) pair from TI, which costs less than 1.5USD for complete SPI single ended to differential with a total of 8 channels (of which 6 are used) 3 on transmit side (MOSI, CLK, CS) & 3 on reveiving side (MISO, Interrupt 1, Interrupt 2)

I would strongly recommend avoiding wasting time exploring without differential drivers if robust communication is expected (which should always be the case anws) unless however learning is the objective.

Also another frugal solution for low noise environment is where one can try using buffers with level transmission from 3.3V to 5V (to increase the noise margins) & Schmitt triggers (to improve noise immunity with hysterisis) there are some low cost solutions (<10cents) like SN74HCS125 series from TI with integrated Current drive strength of 7mA that helps drive the signal & improve RT on high capacitive load cables. Need to focus on proper termintaion for higher clock frequencies. You can also explore the TXU0304 ICs from TI for SPI cable buffering with integrated level translation & Schmitt trigger inputs.

Your choice between robust differential signaling and frugal schmitt trigger buffers & level translators should be dictated by your specific noise conditions.

Federica Bossi
ST Employee

Hi @VikasP ,

Welcome to ST Community!

We have never characterized for such a big distance, but given that you have reduced the speed so it could be possible that the communication may work. Note that this is not guaranteed by ST, however you can try and observe the timings provided, signal integrity and rise fall times on the bus.

Can you also provide a feedback on what they are doing, if it is possible?

If this helps you, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.