-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect mpu9250 to stm32f767zi #8928
Comments
This question should rather be posted here: http://discuss.px4.io/. I have not tried this myself, but I know where in the code to look to find what pins are configured. The board initialization files can be found here: Firmware/src/drivers/boards/px4nucleoF767ZI-v1/
To find out which pins are configured for MISO, MOSI and CLK on SPI1, you need to look at the NuttX config files. These can be found here: Firmware/platforms/nuttx/nuttx-configs/px4nucleoF767ZI-v1:
I hope that helps you. |
Thank you for your response! I connected the MPU9250 as the way you said. And then I get the following: nsh> mpu9250 test nsh> mpu9250 -s test Do you know how to start bus 0 or 3? |
Have you started the mpu9250 driver already? You need to run |
Thank you for your response, ksschwabe! I just run mpu9250 start and then the mpu9250 test. nsh> mpu9250 test nsh> mpu9250 -s start nsh> mpu9250 -s test Do you know why probe failed? |
It could be owing to many reasons.
Do you have a logic analyser to be able to see if you have communication with the MPU9250? |
Thank you, ksschwabe! I will look into those issues. |
Hey, @ksschwabe. |
It looks like the MPU9250 is not responding (the MISO line is not responding). Are you sure that the MPU9250 is powered corectly? |
Hey, @ksschwabe |
I think it is easiest to try and use the I2C_EXPANSION bus (as defined in board_config.h). This is I2C4. I2C is configured with I2C4_SCL on PF14 and I2C4_SDA on PF15. When starting the MPU9250 driver, I think you can still just use MPU9250 start, otherwise you will need to pass it the 'X' option to start on the external I2C bus, |
Hey, @ksschwabe The I2C didn't work. I used the logic analyzer to measure the output signal and there is no output signal from the Nucleo board. The following is the output on the console. I think I have to modify the code so that the I2C can work. But I have no idea where to start. Could you give me some suggestions, please? nsh> mpu9250 -X start |
Do you have pull-ups on the I2C lines? (Probably not if you are connecting it directly to the Nucleo board. Or maybe your MPU9250 dev board has the pull-ups.) You could try using I2C2 (SCL -> pin PF1 and SDA -> pin PF0) or I2C1 (SCL -> pin PF1 and SDA -> pin PF0). |
Hey @ksschwabe |
Unfortunately I don't have a Nucleo STM32F767ZI board, so I can't test this myself. You will have to dig through the code and try and see where it is failing. You can try and post your problem on http://discuss.px4.io/. Hopefully someone there will be able to help you. |
I will try it. Thank you @ksschwabe! |
Were you ever able to resolve this? I am having a similar issue. |
Hey, guys!
I am new to PX4. Here is the situation. I have flashed the px4nucleoF767ZI-v1 to stm32f767zi Nucleo board. And I am able to run mpu9250 application in Nutshell. But I don't know which pins on the Nucleo board I should connect to using SPI connection. Could you guys give me some suggestions, please?
The text was updated successfully, but these errors were encountered: