2025-08-27 6:49 AM - last edited on 2025-08-27 7:35 AM by Peter BENSCH
Hello, I use an AT32F403A MCU to connect LSM6DS3 IMU via SPI 4-wire, then I read the WHO_AM_I register at 0x0F. According to the datasheet, the return value should be 0x69, but the chip returned 0x44. Then I repowered the board, and the value seemed to change to 0x7F. Then I read the Acc and Gyro data. From the logic analyzer, there seem to be some abnormal glitches, which looks like some connection problems, but I checked the wiring and I can't find the problem. Can somebody help me figure out the problem? Thank you.
Solved! Go to Solution.
2025-08-28 6:38 AM
Hi @Wakkk ,
Yes, the symptoms you describe strongly suggest communication issues between your AT32F403A MCU and the LSM6DS3 sensor.
MOSI, MISO, SCLK, CS lines correctly connected? Did you follow the datasheet?
Start with a low SPI clock (e.g., 1 MHz) to ensure signal integrity, then increase if stable. Ensure CS is properly driven low before and high after each SPI transaction.
2025-08-28 6:38 AM
Hi @Wakkk ,
Yes, the symptoms you describe strongly suggest communication issues between your AT32F403A MCU and the LSM6DS3 sensor.
MOSI, MISO, SCLK, CS lines correctly connected? Did you follow the datasheet?
Start with a low SPI clock (e.g., 1 MHz) to ensure signal integrity, then increase if stable. Ensure CS is properly driven low before and high after each SPI transaction.
2025-08-28 7:13 AM - edited 2025-08-28 7:14 AM
In addition to what @Federica Bossi already said,
@Wakkk wrote:From the logic analyzer, there seem to be some abnormal glitches,
Have you used an oscilloscope to see what's happening in the analogue domain?
eg, noise, ringing, unstable levels, sloppy edges, etc ...
@Wakkk wrote:which looks like some connection problems,
Might also be bad decoupling?
@Wakkk wrote:I checked the wiring and I can't find the problem. Can somebody help me figure out the problem?
We can't see you hardware, so we can't check it, or comment on it.
You need to show the schematics & layout.
Also some good, clear photographs.
See: How to write your question to maximize your chances to find a solution.