嗨,ST
使用LSM303C时遇到了一些问题。我们操作LSM303C在模块上电后进入掉电模式。
一般来说,LSM303C的电流消耗约为6 uA
一贯
与数据表e
电气特性
表。但有时候
模块上电后,电流消耗将增加到48 uA。似乎加速模块不适合阅读
ccelerometer Who_AM_I注册得到0x00但没有
0×41。什么可能导致这种现象。请给我们一些指导意见。
我们的操作代码如下:
void LSM303C_Init(void)
{
I2C_WriteOneByte(lsm303_acc,LSM303C_CTRL_REG5_A,0x40); //软复位
user_delay_ms(10);
I2C_WriteOneByte(lsm303_acc,LSM303C_CTRL_REG6_A,0x80); //强制重启
user_delay_ms(5); I2C_WriteOneByte(lsm303_mag,LSM303C_CTRL_REG2_M,0x0c); //重启内存内容,并重置寄存器
user_delay_ms(10);
I2C_WriteOneByte
(lsm303_acc,LSM303C_CTRL_REG1_A,0x00); //掉电
I2C_WriteOneByte
(lsm303_mag,LSM303C_CTRL_REG3_M,0x03); //掉电
}
#power-consump
tion#lsm303c
以上来自于谷歌翻译
以下为原文
Hi, ST
We met some problem when used LSM303C. We operated LSM303C go to power-down mode after the module power on .
Generally , the LSM303C current consumption is about 6 uA which is
consistent
with the datasheet e
lectrical characteristics
table. But sometimes the
current consumption would increase to 48 uA after the module power on. And it seems that the acceleration module didn't work well for reading a
ccelerometer Who_AM_I register to get 0x00 but not
0x41. What may cause this phenomenon. Please give us some guide advice.
Our operating codes are as follow:
void LSM303C_Init(void)
{
I2C_WriteOneByte(lsm303_acc,LSM303C_CTRL_REG5_A, 0x40);//Soft reset
user_delay_ms(10);
I2C_WriteOneByte(lsm303_acc,LSM303C_CTRL_REG6_A, 0x80);//Force reboot
user_delay_ms(5);I2C_WriteOneByte(lsm303_mag,LSM303C_CTRL_REG2_M, 0x0c);//Reboot memory content, And register reset
user_delay_ms(10);
I2C_WriteOneByte
(lsm303_acc,LSM303C_CTRL_REG1_A, 0x00);//power down
I2C_WriteOneByte
(lsm303_mag,LSM303C_CTRL_REG3_M, 0x03);//power down
}
#power-consumption #lsm303c