Це відео не доступне.
Перепрошуємо.
STM32 SPI: MPU9250 IMU detailed guidance
Вставка
- Опубліковано 18 сер 2024
- This video shows how to configure SPI to communicate with the MPU9250 IMU sensor.
A code is available on: github.com/Ste...
Visit the website to learn the Orientation Estimation using STM32 MCU and IMU sensor:
www.steppescho...
Datasheet MPU9250:
invensense.tdk...
Register map:
invensense.tdk...
0:00 Introduction
0:12 Configure SPI using STM32Cubemx software
1:26 Timer interrupt explanation
2:26 Reading IMU measurements using SPI
7:09 Plotting data using the timeline graph
8:12 Changing the accelerometer full-scale range by transmitting data through SPI
11:17 Further improvements
I from Colombia, I watch your videos about imu sensors. I would like You to continue with the imu icm sensor configuration series.
Hi,
I appreciate your interest in my channel. Soon, I will release new videos about the ICM-20948 sensor. If you have not subscribed, do not forget to subscribe to avoid missing out on new videos. Also, you can get up-to-date info and source code on my Patreon page:
www.patreon.com/user?u=80399744
Very helpful. Thanks :)
Glad it was helpful!
hello sir, thank you very much for the videos you have posted till now/
could you please post a video on how to initialize the swv data tracking timeline graph, and how to use them for I2C connections as well.
that would be really helpful for my project.
Very cool
Thanks😀
Hii,
I am using imu icm-42688 with stm32 nucleo-144 board. Here, i am trying to read WHO_AM_I register value but output i am getting is 0xFF or 0x0. I dont know what is going wrong
Hi, Are you sure that the wirings are correct? Once you verify it, check the register address and other small details. Usually, the problem originates from a place you least expected
Actually I got the output but it's not working on setting frequency of spi above 2Mhz
Complete guidance on Euler angles and quaternions computation using IMU sensors can be found in my course:
www.steppeschool.com/courses/stm32-hal-orientation-estimation
The code is available on: github.com/Steppeschool/STM32-MPU9250-Example
For accessing the full scale range using mpu9250_write_reg() function, why are you sending the register without write bit? I could see you have just send 0x28 as address. Are you not sending the write bit because the write bit is "0"?
Yes, you are right. The most significant bit is 0 for a write operation and '1' for read operation
Could you please explain the prescaler that you use in the beginning of the video? Why did you choose that value, how does it affect the process?
Thanks.
Hi,
The prescaler defines the speed (frequency) of the SPI protocol:
SPI speed = clock frequency / (prescaler + 1)
Usually, every chip has a maximum SPI speed it can support. Based on this info, you set the prescaler. However, if time is not critical, you can set higher prescaler to have lower speed.
Did I answer your question?
@@steppeschool3629, you did. Thank you very much.
Greetings from 🇩🇪.
why did u perform this operation
uint8_t temp_data = 0x80|reg;
from did that 0x80 came ?
Hi,
For a read operation, you have to set the most significant bit. That is why I added 0x80
Hello friend, my scale setting on the accelerometer is not working, it is only in 2g mode. MPU9250
Hi,
What value did you set for register 28 (accelerometer configuration register)?
Not sure if it matters to you, but this particular IMU, the MPU9250 is no longer manufactured. There are still some around.
thanks for insightful information
I bought one board, thats fake ic