Skip to main content
Visitor II
October 28, 2025
Question

STM32F103 - SPI3 stops PWM on TIM3

  • October 28, 2025
  • 2 replies
  • 295 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.

    This topic has been closed for replies.

    2 replies

    BamblooAuthor
    Visitor II
    October 28, 2025

    Bambloo_0-1761640247671.png

    Here is my pin configuration.

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

    Graduate
    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.

    BamblooAuthor
    Visitor II
    October 28, 2025

    I called 

    Bambloo_0-1761648953399.png

    and it doesn't work either.

     

    Super User
    October 28, 2025

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