2022-01-01 02:44 AM
2022-01-01 04:18 AM
Which STM32?
Switch the pins to Output in respective GPIOx_MODER, and then manipulate them as outputs (through GPIOx_ODR or GPIOx_BSRR). When done, switch back to Alternate Function again in GPIOx_MODER.
I don't know what is pin stacking.
JW
2022-01-02 05:28 PM
A pin can't be GPIO and SPI at the same time, so changing between the two as JW suggests is the only way to do this.
It is not typical of SPI communication to need to control data lines separately from the clock.