你好
Batek.Miroslav
感谢您的评论。
我试着配置
CTRL_REG1
然后读取OUT_X_ / OUT_Y_ / OUT_Z_,例如OUT_Y
_L,但即使我没有移动它,我也有不同/变化的价值。这是正常的吗?如果有什么不对的话,你能不能查看我的日志?
非常感谢。
---日志---
开始...
致电LIS3DH_GetWHO_AM_I
读LIS3DH_WHO_AM_I(0x0F)寄存器:0x33 --- UART2 RX HEX:---
7E 20 03 33 20 4E
Cal_Checksum:0x4E
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x20,响应:0x57 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x80 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x80 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x40 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0xC0 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x40 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x40 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0xC0 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x40 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x80 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x00 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0x40 --- UART2 RX HEX:---
7E 20 04 33 2A 43
Cal_Checksum:0x43
调用HAL_I2C_Mem_Read
读I2C器件地址:0x33,寄存器地址0x2A,响应:0xC0 ---
谢谢,
阿娜李
注意:原始帖子包含大量线程对话,只能迁移到第9级
以上来自于谷歌翻译
以下为原文
Hello
Batek.Miroslav
Thank you for the comment.
I tried to configure
CTRL_REG1
then read OUT_X_/OUT_Y_/OUT_Z_, for example, OUT_Y
_L, but I got different/changing value even though I didn't move it. It is normal?Could you be kindly to review my log if anything wrong?
Thanks a lot.
--- Logs ---
START...
call LIS3DH_GetWHO_AM_I
read LIS3DH_WHO_AM_I(0x0F) reg: 0x33--- UART2 RX HEX: ---
7E 20 03 33 20 4E
Cal_Checksum: 0x4E
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x20, Response: 0x57--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x80--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x80--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x40--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0xC0--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x40--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x40--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0xC0--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x40--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x80--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x00--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0x40--- UART2 RX HEX: ---
7E 20 04 33 2A 43
Cal_Checksum: 0x43
call HAL_I2C_Mem_Read
Read I2C device addr: 0x33, register addr 0x2A, Response: 0xC0---
Thanks,
Arna Lee
Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level