Skip to main content
Visitor II
June 9, 2023
Solved

GPIO SPI 5 miswired on STM32MP15 Discovery Kit MB1272

  • June 9, 2023
  • 2 replies
  • 1214 views

I was trying to use the GPIO expension connector on the STM32MP15 Discovery Kit MB1272 and the clock wasn't working on SPI5. When I checked the CubeMX configuration against the schematic for the discovery kit, I leaned that the clock signal is going to the Arduino connector instead of the GPIO expansion. The schematic insinuates that PF7 is SPI5_SCK, when it is actually PH6. Is this a known issue?

    This topic has been closed for replies.
    Best answer by PatrickF

    HI @Aaron Lebahn​ 

    From STM32MP157 datasheet, SPI5_SCK is available on either PF7-AF5, PH6-AF5 or PK0-AF5.

    So, Schematics is OK in using PF7 for SPI5_SCK.

    In Default Device tree (e.g. Starter Package), SPI5_SCK is defined on PF7.

    https://github.com/STMicroelectronics/linux/blob/v5.15-stm32mp/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi#L1850

    Maybe a Device tree pinmux issue or overlook on your side.

    Regards.

    2 replies

    PatrickFAnswer
    Technical Moderator
    June 12, 2023

    HI @Aaron Lebahn​ 

    From STM32MP157 datasheet, SPI5_SCK is available on either PF7-AF5, PH6-AF5 or PK0-AF5.

    So, Schematics is OK in using PF7 for SPI5_SCK.

    In Default Device tree (e.g. Starter Package), SPI5_SCK is defined on PF7.

    https://github.com/STMicroelectronics/linux/blob/v5.15-stm32mp/arch/arm/boot/dts/stm32mp15-pinctrl.dtsi#L1850

    Maybe a Device tree pinmux issue or overlook on your side.

    Regards.

    ALeba.1Author
    Visitor II
    June 12, 2023

    Hi @PatrickF​ 

    Thanks for your reply. I was able to modify the setting in STM32CubeMX to set SPI5_SCK to PF7. I tried to do that before but didn't realize it wouldn't show as an option until I disabled the existing setting for SPI5_SCK. After setting the mux correctly, I'm seeing the clock signal on the GPIO expansion as expected.