Nucleo-stm32H743ZI2 SPI issues

I am working on building a custom board set up based off on the Nucleo platform. I have built it many times off of 4.0-4.3 version of copter,and plane, but i can not get this to talk to any mpu6500 or mpu9250 over SPI. All that is installed atm is a bmp-280 on SPI3 and a mpu6500 on SPI1. I have used the preset “NucleoH743” and one I built from the ground up. Currently i am on the stock Nucleoh743 hwdef.bat on copter 4.3. When you log into mission planner and connect to the board it has an error printed to the screen that prints “Config Error: INS: unable to initiliaze driver.” It seems to see my BMP-280 fine, but always errors on the MPU. Under the hardware HW ID, it shows the BMP-280 on SPI bus 3 only, and nothing on SPI bus 1.



I have tried the both the 6500 and the 9250 on spi1, spi2, spi4, and spi5, but i can not seem to get it to load the driver correctly. Please take a look and see if I you see any glaring mistakes.

I do not have a logic analyzer to verify this is my issue, but from my research this looks to be a likely issue I am facing with my spi peripherals failing to initialize. It seems the nucleo-stm32h7zi2 development boards have a weird condition that causes nss to to disable for a brief moment causing the signal to drift close to ground. The solution is to change: SPI_MASTER_KEEP_IO_STATE_DISABLE; To this : SPI_MASTER_KEEP_IO_STATE_ENABLE then NSS. I’m not entirely sure how to implement this and test it. Any advise? Can this be added to the hwdef area or more driver level? Source: https://community.st.com/s/question/0D53W00000A2xuESAR/why-is-spi-not-working-on-nucleoh743zi2-nss-is-wrong-direction-and-no-clockno-output-solved-but-why Additionally is see in the ChibiOS pages Giovanni has ran up against this in some of his testing on this board with CHibiOS under his “where to start stm32 thread. Where to start STM32H7 support - Page 3 - ChibiOS Free Embedded RTOS

1 Like

I’m far from an expert, but I would look at the MATEKH743 configuration.

The matekh743-wing uses a STM32H743VIT6. There difference between the v2 and v3 of the board is:
IMU ICM42688-P(V3)+ICM42605 instead of MPU6000(V2)+ICM42605
(otherwise pinouts and everything else is identical according to their website)

from their v2 page:

  • IMU: MPU6000 (SPI1) & ICM42605 (SPI4)
  • Baro: Infineon DPS310 (I2C2)***
  • OSD: AT7456E (SPI2)
    1x SPI3 breakout
    7x Uarts (1,2,3,4,6,7,8) with built-in inversion.
    *** I assume this means I2C #2 not a typo for i2c :slight_smile:

The mpu6500 is supported for something else, but you will have to add something to get support for it. It is a different beast then the 6000, and you will probably need some anti-vibration dampening because it is more sensitive and updates faster.

I am interested if you get this working. .