Skip to main content
Visitor II
November 1, 2018
Question

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

  • November 1, 2018
  • 2 replies
  • 1138 views

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

    This topic has been closed for replies.

    2 replies

    ST Employee
    November 1, 2018

    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

    Alex DimAuthor
    Visitor II
    November 7, 2018

    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 DimAuthor
    Visitor II
    December 6, 2018

    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