Custom STM32F767 flight controller based on FMUv5 pin configuration – SPI1 alternate pin mapping

Hello,

I am designing a custom flight controller using the STM32F767IIT6, with the ArduPilot FMUv5 hardware definition as a reference.

I am currently having an issue with the SPI1 pin mapping.

The standard SPI1 pin configuration on the STM32F767 that I tested is:

PA5  SPI1_SCK
PA6  SPI1_MISO
PA7  SPI1_MOSI

With this configuration, SPI1 works correctly.

However, the FMUv5 uses the following SPI1 pin mapping:

PG11 SPI1_SCK
PA6  SPI1_MISO
PD7  SPI1_MOSI

When I use the FMUv5 pin mapping, I do not see any SPI signal on the bus.

I would like to use the FMUv5 pin mapping because I need to keep PA7 available for CRS_DV for an RMII Ethernet connection.

For testing, I have temporarily removed all Ethernet-related configuration from my hwdef.dat.

The relevant SPI configuration is currently:

PG11 SPI1_SCK SPI1
PA6  SPI1_MISO SPI1
PD7  SPI1_MOSI SPI1

The SPI devices are configured as:

SPIDEV icm42688 SPI1 DEVID1 ICM42688_CS MODE3 2*MHZ 8*MHZ
SPIDEV icm20602 SPI1 DEVID1 ICM20602_CS MODE3 2*MHZ 8*MHZ

With the following configuration:

PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1

the SPI bus works correctly. However, with:

PG11 SPI1_SCK SPI1
PA6  SPI1_MISO SPI1
PD7  SPI1_MOSI SPI1

I do not observe SPI activity.

I have also configured:

DMA_NOSHARE SPI1*
DMA_PRIORITY SPI1*

My questions are:

  1. Is the hwdef.dat syntax above sufficient to configure the alternate SPI1 pin mapping on the STM32F767?

  2. Is there any additional configuration required for the STM32F7/ChibiOS alternate-function pin mapping?

  3. Are PG11, PA6, and PD7 valid and usable as the three SPI1 signals in this configuration?

  4. Could the issue be related to DMA, alternate-function selection, or the specific SPI1 configuration used by ChibiOS?

  5. Is there any additional configuration required when moving SPI1 away from the default PA5/PA6/PA7 pins?

I am using the following hardware definition:

hwdef.txt (2.4 KB)

For debugging, I can also provide:

  • the complete schematic and PCB pin mapping;

  • the exact ArduPilot branch/commit used to build the firmware;

  • boot messages and console output;

  • a DataFlash .BIN log;

  • logic-analyzer captures comparing the working and non-working SPI configurations.

Thank you very much for your help :slight_smile:.

Best regards,
David