cancel
Showing results for 
Search instead for 
Did you mean: 

PWM on PB15 and SPI2 in receive only master mode - stm32f103

Bogdan
Senior

Hello,

i am using stm32f103C6 ( 48 pin device) and i use TIM1 Channel 3N to generate a pwm via PB15 pin.

The tricky part is that i am using SPI12 in receive only master mode.

Therefore MOSI pin is not used, but since i have little pins available, i want to use PB15 to generate a pwm. But i see i cannot use it as long as SPI2 is enabled.

I need both, its not clear from the reference manual if there is a work arround or i need to move the pwm feature on another pin?

1 REPLY 1

GPIO on the ancient 'F1 is a nightmare and, exactly as you've said, poorly documented. Some peripherals - e.g. timers - can give up a pin set as AF, if not set to output inside the peripheral; others don't. Plus there are nasty related erratas. So if there is no clue in documentation, the only way is to try... or if you don't have a testing platform, then better assume that SPI can't give up the MOSI pin even in Rx-only mode.

JW