cancel
Showing results for 
Search instead for 
Did you mean: 

I have a question about the connection of LSM6DS3 with an external sensor MAG3113

Alex Dim
Associate II

Hello and thank you in advance,

i am trying to connect the LSM6DS3 accel+gyr with the 3110 magnetometer. I want to connect the mag on the LSM6DS3 and i want it to see it as an exterrnal sensor so i can sent the data of the magnetometer to LSM6DS3's internal FIFO. The problem is that in the LSM6DS3's datasheet there are this registers:

- SLV0_ADD -> (I2C slave address of the first external sensor (Sensor1) register (r/w)) // Magnetometer's slave address (everything ok)

- SLV0_SUBADD -> (Address of register on the first external sensor (Sensor1) register (r/w)) // This is an 8-bit register, what should i put here? Which register? The mag's register for only the x axis is 16-bit long -> OUT_X_MSB(8-bit) & OUT_X_LSB(8-bit)

Thanks

3 REPLIES 3
Miroslav BATEK
ST Employee

In the SLV0_SUBADD you should put the first address of the MAG3113 output register. In the SLAVE0_CONFIG register you should set how many consecutive reading operations should be performed to real all output data from external sensor.

Please read application note AN 4650:

https://www.st.com/content/ccc/resource/technical/document/application_note/12/98/b4/44/a5/bf/4e/c5/DM00157511.pdf/files/DM00157511.pdf/jcr:content/translations/en.DM00157511.pdf

Hello, i have read tha AN4650 before but i couldn't figure out what in two lines you clearly explained to me, thank you very much, i haven't tried it yet but i will.

Alex Dim
Associate II

Hello again,

i have an additional question,If i want to use the PASS_THROUGH_MODE, after i enable pass through do i treat the registers as if i was directly connected to it via I2C. Do i write and read registers directly?

Thank you