On STM32H5, we would like assign PA5 to SPI1_SCK (AF5) = output (SPI Master) and simultaneously to SPI6_SCK (AF8) = input (SPI slave). The port structure seems to allow for this. Could you confirm that this is possible, please?
1- You’ve posted that question in “STM32 MPU ….” forum board while STM32H5 is a MCU (a microcontroller)
2- In next time please provide the exact part number you are using. STM32H5 is having many part numbers and we cannot determine which document we need to refer to support you. After several attempts to find what part number you are using, I think you are referring to STM32H5E/F or something like that.
3- For you question, that’ not possible. You’ve already indirectly answered the question in your prompt:
SPI1_SCK (AF5) = output / SPI6_SCK (AF8). You are trying to assign the same IO two different alternate functions.
1- You’ve posted that question in “STM32 MPU ….” forum board while STM32H5 is a MCU (a microcontroller)
2- In next time please provide the exact part number you are using. STM32H5 is having many part numbers and we cannot determine which document we need to refer to support you. After several attempts to find what part number you are using, I think you are referring to STM32H5E/F or something like that.
3- For you question, that’ not possible. You’ve already indirectly answered the question in your prompt:
SPI1_SCK (AF5) = output / SPI6_SCK (AF8). You are trying to assign the same IO two different alternate functions.
> 2- In next time please provide the exact part number you are using. STM32H5 is having many part numbers and we cannot determine which document we need to refer to support you.
In this specific case, the exact part number is redundant. No STM32 MCU allows more than one alternate function (AF) for any GPIO pin at a time. They are all mutually exclusive, i.e. this is a “1 out of n” relation.
The other way around usually works - one can enable a specific peripheral functionality (like SPI1_SCK) on two GPIO pins simultaneously, if it is routed to those pins.
In this specific case, the exact part number is redundant. No STM32 MCU allows more than one alternate function (AF) for any GPIO pin at a time. They are all mutually exclusive, i.e. this is a “1 out of n” relation.
→ SPI6 is not available on STM32H503 nor on STM32H523/STM32H533 for example … Before analyzing the case need to ensure the user inputs are correct (who knows SPI6_SCK is not mapped at PA5 ;) ). So I needed to check different H5 datasheets available to find which one corresponds to what he’s using.
Moreover, providing the MCU part number is the info that should be provided no matter the case is.
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Show me a device that can do that - a MCU were a single GPIO can work as output pin for one peripheral unit and simultaneously as input pin for a different peripheral unit.