2025-10-28 1:26 AM - last edited on 2025-10-28 3:11 AM by Andrew Neil
I'm using SPI3 and TIM3's PWM CHANNEL 1 on PB4.
after HAL called __HAL_RCC_SPI3_CLK_ENABLE(), the PWM output disappeared...I want to know how to fix this.
2025-10-28 1:31 AM
Here is my pin configuration.
SPI3 is configured to Transmit Only Master with NSS Signal Disabled.
2025-10-28 2:07 AM
AFAIK, you cannot do too much to fix it. The only chance is to use remap functionality described in the manual - if it is possible, change the mapping of SPI 3 pins. In F1 series, peripherals have fixed priority for taking control over pins; if you enable 2 peripheral possibly using the same pin, one of them will take control over the pin and you cannot choose which one. That's why in all the newer STM32 series AFR registers were introduced.
2025-10-28 3:56 AM
I called
and it doesn't work either.
2025-10-28 4:33 AM
SPI will take over the pins unless it's disabled in RCC.