Hi,
there is a table Table 1-10. Signal Properties Summary which presents functions at the pins. If the pin has more then one function then priority for functions is from left to right (smallest to largest). It means, theoretically, if you have all functions enabled at the pin the the function with the highest order number is connected to the pin and all others are not connected to the pin even they are enabled.
if you enable SPI at PH then the pins will be connected to the SPI peripheral and no GPIO R/W will be connected to the pins.
For example, let's imagine you will accidentally connect to PH4 MISO2 (Function 3rd) and RXD4 (function 4th) and GPIO is default then the function with highest order is RxD4 so it takes precedence over all other functions. So, all other function will be disconnected from the pin.
Note:
Do not forget that when you disable the function then smaller priority function (if enabled) is connected to the pin. For example, I have connected to the pin function which uses it in HighZ and connected to hard signal source.
Let's imagine, I accidentally set the data direction of the pin as output and put level 0 to the port. Nothing happens till I dissable the alternative function at the pin from any even accidental reason. So, if I disable the alternative function I have shortcut at the pin because GPIO function is immediately connected to the pin. In order to be sure it will never happen you should set the GPIO direction at the pins to input function.
Best regards,
Ladislav