LSM9DS1 WHO_AM_I REGISTER (0x0F)
Hello,
I have difficulties to get value of 0x68(IMU) and 0x3D(Magnetometer) from LSM9DS1 WHO_AM_I Reg 0x0F.
I did on custom made board with STM32L083RZ and use I2C communication to LSM9DS1. I am using I2C3 PortC pin 0 and pin 1. The SDA&SCL are both pulled up with 4.7kOhm to VCC_MCU. CS_A/G Pin are pull-up to VCC_MCU without pullup resistor. And SDO_A/G and SDO_M pin are connected directly to STM32L0 at PortC_2 and PortC_3 which are then set(HIGH) as output_OpenDrain in GPIO Init() function. The address of slave would be 0x68<<1.
As I debug, I can see SDA& SCL are both correctly configured as Alternate Function OPEN DRAIN (AFRL=0x00000077). But the PROBLEM is I cannot read WHO_AM_I value with function below
HAL_I2C_Mem_Read (&hi2c3, LSM_ADDR_IMU|0x01,WHO_AM_I_REG,1, &check, 1, 1000);
I did change slave address to other value and it still did not return me 0x68.@
Can you help me? What is wrong.
Thank you in advance. @ST Community
Regards
Anuar
