cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 - SPI3 stops PWM on TIM3

Bambloo
Visitor

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.

4 REPLIES 4
Bambloo
Visitor

Bambloo_0-1761640247671.png

Here is my pin configuration.

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

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

I called 

Bambloo_0-1761648953399.png

and it doesn't work either.

 

SPI will take over the pins unless it's disabled in RCC.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice