magnetometer - MPU-9250 how to configure pass through I2C -


i have mpu-9250 connected via i2c intel edison arduino board (pins a4/a5).

i can read , works reading acc , gyro

mpu9250_address = 0x68

now disable i2c master module

i2c.writereg(user_ctrl, 0b00000000) # i2c_mst_en

# 1 – enable i2c master i/f module; pins es_da , es_scl isolated pins sda/sdi , scl/ sclk.

# 0 – disable i2c master i/f module; pins es_da , es_scl logically driven pins sda/sdi , scl/ sclk.

now enable i2c bypass mux

i2c.address(mpu9250_address)

i2c.writereg(int_pin_cfg, 0b00000010) # bypass_en set high # when asserted, i2c_master interface pins(es_cl , es_da) go ‘bypass mode’ when i2c master interface disabled. the pins float high due internal pull-up if not enabled , i2c master interface disabled.

so according the datasheet if disable i2c master module inside chip , activate bypass , should able access directly compass via i2c.

not no reason believe still happens " ... float high due internal pull-up ... ", because looked oscilloscope @ 2 signals , before activating bypass signal 1 , 0 logic spot on, after activating 1 logic level went few mv (nothing worry yet) 0 logic no close 0v , in fact somewhere close logic 1 voltage, can still make difference in between 0 , 1 visually on oscilloscope screen nothing sane electronic device recognize 0. anyway long story short believe somehow internal pull ups not deactivated.

once bypass_en bit set whole i2c bus experiencing issue, measured signals on aux_cl , aux_da pins , identical ones on scl , sda pins bypass it's job there pulling line after bypass switch high. , have no idea how disable it.

how configure mpu-9250 in i2c bypass mode other setting must made besides 2 bits i'm setting

user_ctrl->i2c_mst_en = 0

int_pin_cfg->bypass_en = 1

all other registers untouched


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -