MPU9250 SPI not working, what can I do?

By djjokkewokke , 11 May 2016

Hi,

I'm a student electronics, and for my thesis work, I have to design a Bluetooth based control system for a Parallax ELEV-8 quadcopter with live sensor feedback. I'm using the MPU9250 in my project to determine Euler Angles of the quadcopter. I connected the MPU9250 to the microcontroller (Microchip PIC24EP512GP806) using SPI, but I've been trying for 3 days to get any response from the MPU9250. I've checked the hardware connections, and they all seem perfectly fine. I've published a picture of the hardware on my dropbox account: https://www.dropbox.com/s/2oxdg33c5l7ybr5/Hardware.jpg?dl=0.

My program is quite simple. When the board is powered up, it waits for 100ms, then makes the slave select line low and outputs the address of the USER_CTRL register with the read/write bit on zero (=> 0x6A). Next, it outputs 0x10 (or thus 0b00010000), to set the I2C_IF_DIS bit, as recommended in the datasheet. I've published a screenshot of the logic analyser on my Dropbox account: https://www.dropbox.com/s/x47e6hjycglcmwk/StartUp.PNG?dl=0 . Channel 0 is SCK (750 kHz), channel 1 is SDO, channel 2 is nSS and channel 3 is SDI.

Next, I just output the address of the WHO_AM_I register, but with the read bit set (=> 0xF5). This byte is followed by a 0x00 byte (junk), in order to read the response of the MPU9250. However, as said before, it never responds :(, This can be seen on the screenshot of the logic analyser: https://www.dropbox.com/home/Public?preview=Loop.PNG . Channel 0 is SCK (750 kHz), channel 1 is SDO, channel 2 is nSS and channel 3 is SDI.

I don't know what I can do to fix it, I already tried many things... is my MPU9250 broken? Is there a way to verify this?

Any help is welcome, without the MPU9250, it is impossible to make a control system for the quadcopter, as I simply won't be able to stabilise it.

Kind regards,
Joren

phpbb Topic ID
34161