Skip to main content
Associate
October 28, 2025
Question

STM32F103 - SPI3 stops PWM on TIM3

  • October 28, 2025
  • 2 replies
  • 296 views

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.

2 replies

BamblooAuthor
Associate
October 28, 2025

Bambloo_0-1761640247671.png

Here is my pin configuration.

SPI3 is configured to Transmit Only Master with NSS Signal Disabled.

gbm
Principal
October 28, 2025

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
BamblooAuthor
Associate
October 28, 2025

I called 

Bambloo_0-1761648953399.png

and it doesn't work either.

 

TDK
Super User
October 28, 2025

Use a newer chip family. Can't change how the F103 operates. This limitation only exists on F1 series.

"If you feel a post has answered your question, please click ""Accept as Solution""."