Use Spi to run mpu_init()

By chucker_t , 29 August 2014

I am trying to use spi to initialize mpu9250. I enable 9250 by "#define MPU9250" in "inv_mpu.c". However when i try to run mpu_init(), I found that the program has problems in running the following codes:

if (!st.chip_cfg.sensors)
return -1; // always return -1;

then i simply comment this and found another problem:

if (mpu_read_mem(MPU6500_MEM_REV_ADDR, 1, &rev))
return -1;

the "rev" value is 3 and it causes return -1 action after execution of "log_e("Unsupported software product rev %d.n");"

Do I need to modify some registers before I read the "rev" value? I did try to use spi to read who_am_i and can get 0x71. :(

phpbb Topic ID
16524