how to Burst Read mpu9250 with spi ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
user_3716231
Level 4
Level 4
25 sign-ins 10 sign-ins 5 sign-ins

according to datasheet,number sixth it says it supports single or burst read/writes.i can implement single read/writes and read data from accelerometer register and the value of x,y,z is 0,0,1 respectively.but now i try to burst read to get data from register and the value of x,y,z is 0,0,-0.12 respectively.

could someone help me for this?here is my project.

0 Likes
1 Solution

i've done that before and it worked.according to data sheet page 35 Burst Read Sequence

https://www.invensense.com/wp-content/uploads/2015/02/PS-MPU-9250A-01-v1.1.pdf

for example:

I2C_MasterSendStart(DeviceAddress,0);   

I2C_MasterWriteByte(Register);               

I2C_MasterSendRestart(DeviceAddress,1);

I2C_MasterReadByte(I2C_ACK_DATA);            // Read from register

I2C_MasterReadByte(I2C_NAK_DATA);            // Read from register, last byte is NAKed

I2C_MasterSendStop();                   

if you still don't understand,please let me know or you could attach your project so that i can help you.

sean

View solution in original post

0 Likes
4 Replies