5412 views|8 replies

22

Posts

0

Resources
The OP
 

How to use SPI to obtain data from MPU9250 through the HAL library? [Copy link]

This post was last edited by Studying_sss on 2017-12-25 19:01 I need help from the experts on the Internet. How can I get the data of MPU9250 using SPI through HAL library? Please explain in detail RM-MPU-9250A-00.pdf (508.01 KB, downloads: 13) Data acquisition: mpu9250Type.c (4.46 KB, downloads: 23) mpu9250Type.h (1.81 KB, downloads: 20)
This post is from stm32/stm8

Latest reply

I wish you a happy holiday and a new year.  Details Published on 2019-4-1 09:36
 

4005

Posts

0

Resources
2
 
The hal library just builds a framework for you and initializes spi. You have to do the rest yourself.
This post is from stm32/stm8
 
 

22

Posts

0

Resources
3
 
huo_hu posted on 2017-12-26 15:37 The hal library just builds a framework for you and initializes spi. You have to do the rest yourself
Yes, I just want to know how to configure MPU9250 to get the data correctly. Now there is data, but the acceleration is not right. There is data on the X and Y axes. I use the functions HAL_SPI_Transmit and HAL_SPI_Receive in it to do it
This post is from stm32/stm8
 
 

4177

Posts

9

Resources
4
 
MPU9250 definitely has registers. Needless to say, when you operate it, you will definitely operate its registers. This is inevitable. Also, to obtain data through spi, you must operate the DR register of the SPI hardware of stm32, if I remember correctly. You can click into the library function to see the specific implementation. Also, remember to read the "How to use this driver" in the library function. The attachment is the user manual of the F4 series and F1 series hal library of the HAL library. STM23F1XXX--HAL库使用手册.pdf (3.88 MB, downloads: 11, 售价: 1 分芯积分) STM23F4XX--HAL固件库驱动详解.pdf (4.48 MB, downloads: 11, 售价: 1 分芯积分)

This post is from stm32/stm8
 
 
 

22

Posts

0

Resources
5
 
huaiqiao posted on 2017-12-27 16:45 MPU9250 definitely has registers. Needless to say, when you operate it, you will definitely operate its registers. This is inevitable. Also, through spi ...
OK, thank you
This post is from stm32/stm8
 
 
 

192

Posts

0

Resources
6
 
I wish the host a happy holiday, and a new year with a new look, everything goes well, and there will be no more problems, haha
This post is from stm32/stm8
 
 
 

22

Posts

0

Resources
7
 
Posted on the road of learning on 2017-12-30 13:06 I wish the host a happy holiday, and a new year with a new atmosphere, everything goes well, and there will be no more troubles, haha
, thank you, and I wish you a happy new year too!
This post is from stm32/stm8
 
 
 

3

Posts

0

Resources
8
 
Good stuff! Thank you!
This post is from stm32/stm8
 
 
 

527

Posts

1

Resources
9
 
I wish you a happy holiday and a new year.
This post is from stm32/stm8
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list