2025-10-16 2:56 AM - last edited on 2025-10-16 3:52 AM by Andrew Neil
I am working with the STM32U5G9J-DK2 discovery board and trying to interface an SPI peripheral
However, I am unable to get the SPI communication working.
I configured SPI in STM32CubeIDE but I’m not sure which SPI instance and pins are actually free to use. I suspect some pins are already connected internally to the LCD or Octo-SPI flash.
2025-10-16 3:56 AM
@vaibhavivele wrote:I’m not sure which SPI instance and pins are actually free to use.
If you specify the board when you create the CubeMX project, it should identify which pins are used by on-board features.
Otherwise, check in the User Manual for the board, and the schematics.
The User Manual can be found on the 'Documentation' tab of the Product Page:
https://www.st.com/en/evaluation-tools/stm32u5g9j-dk2.html#documentation
and the schematics will be on the 'CAD Resources' tab:
https://www.st.com/en/evaluation-tools/stm32u5g9j-dk2.html#cad-resources
2025-10-16 3:56 AM
Hello @vaibhavivele
You can use the SPI1 interface on PA5 SPI1_SCK, PA6 SPI1_MISO, PB5 SPI1_MOSI and PB0 SPI1_NSS. They are all available on the CN4 Arduino connector of the boards (pins number 3 to 6).
Best Regards.
II