cancel
Showing results for 
Search instead for 
Did you mean: 

asm330lhhxg1 "who_am_i" register is reading back 0x48. Should be 0x6.

arifkhan
Associate II

Connected STEVAL_$MKI243AA board to a nucleo-g491re board using 4 wire spi interface. The spi bus is setup to run @ 146 Kbits/sec. Reading back bad data. 

WHO_AM_I is 0x48

PIN_CTRL is 0x3E

 

Not sure but seem like the device is power

13 REPLIES 13

Hello Andrew,

 

Why do you say that MISO is bad? At the start of the SPI cycle, the IMU will not drive this signal, and so the MISO line would be floating (which is what is being observed). in the second part of the SPI cycle, read data is clearly being driven back by the IMU i.e. 0x48 (which is the problem. It should be 0x6B). 

 

Thx.

 

Rgds.

 


@arifkhan wrote:

Why do you say that MISO is bad? .


Just look at it:

AndrewNeil_0-1777290222898.png

It's supposed to be a digital signal; ie, it should have just 2 clearly distinct levels - low and high.

Yours seems to have about five different levels !

 


@arifkhan wrote:

At the start of the SPI cycle, the IMU will not drive this signal, and so the MISO line would be floating 


Even so, it shouldn't be fluctuating like that - something looks very wrong!

 

Again, you still haven't shared schematics or code.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

arifkhan_0-1777422199330.png

Here is the sketch of my setup. The two evals boards are jumpered as shown with 8" jumper wires.

 

Project was created with STM32CubeMX and then debugged in STM32CubeIDE ver 2.1.1

 

Hey Andrew,

 

Do you see anything in the code?

 

Rgds.