Skip to main content
Associate
Jun 2, 2025 6:08 PM UTC
Question

LSM6DSO SPI Bug for high volume project

Using the LSM6 over SPI with the RP2040 Microcontroller for a mission-critical project (flight controller for UAVs).

The SPI works well. Well in theory. In practice, 1 in every 20-100 reads returns corrupt SPI data (WHOAMI reads as 0x68/0x58). This issue is somewhat reduced when moving the sensor (worst when still) and when adding decoupling capacitors (reduces corruption dramatically).

The project itself is ultra high volume (10k+ units), and we have already invested a very large amount of time and resources into testing.

This topic has been closed for replies.

2 replies

TDK
Jun 2, 2025 7:54 PM UTC

> In practice, 1 in every 20-100 reads returns corrupt SPI data (WHOAMI reads as 0x68/0x58).

> we have already invested a very large amount of time and resources into testing.

These statements are somewhat at odds. A 1-5% failure rate should be pretty easy to check.

 

No magic bullet here. Some things that can help:

  • Lower clock speed and/or slower edges.
  • Better shielding from EMI.
  • Terminating resistor on SPI line with or without controlled impedance.
  • LVDS or similar differential transceivers at each end.
  • Decoupling capacitors.
  • Reduced signal/wire length.
  • Better grounding (avoid loops).

 

A UAV will have higher EMI than a normal application. Consider decoupling capacitors a must rather than a recommendation.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ZarvanMAuthor
Associate
Jun 3, 2025 5:52 AM UTC

Hi!

Thanks for the reply.

Yes, we have followed best practices, and the failure occurs on with bench testing, not yet on a UAV.

The 1-5% failure rate is influenced by:

1. Whether the IMU is untouched

2. Adding lots of electrolytics at input

3. Changing SPI speed (lower sometimes causes MORE problems)