cancel
Showing results for 
Search instead for 
Did you mean: 

PA15 as TIM2_CH1 doesn't work on F103RG with SPI 3 on

Victoria13
Associate
Hi all,
I'm using a F103 on my current project. I have trouble using the PA15 as TIM2_CH1 which is connect to a LED. I also have a serial flash connected via SPI on PB3 to PB5. As long as I don't activate the corresponding SPI timer in the RCC_APB1ENR register the LED works. I tried using SPI3 with PB3, PB4 and PB5 and I also tried to remap the SPI1 to use this pins.

My question is: Is it possible to use the SPI on PB3 to PB5 and use PA15 as TIM2_CH1?
1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for your reply. I couldn't get it working with CubeMX, but I found the solution in the reference manual. The NSS pin (PA15) needs to be defined as output (set the SSOE bit in SPI_CR2 register). After that it is posible to use the PA15 pin as TIM2_CH1. (I also did the partial remap of TIM2 and diabled the JTAG interface)

View solution in original post

2 REPLIES 2
AScha.3
Chief II

Hi,

>Is it possible to use the SPI on PB3 to PB5 and use PA15 as TIM2_CH1?

Yes.

Just set it with CubeMx , then you see...(and how to set the init, even if you dont want use Cube.)

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

Thanks for your reply. I couldn't get it working with CubeMX, but I found the solution in the reference manual. The NSS pin (PA15) needs to be defined as output (set the SSOE bit in SPI_CR2 register). After that it is posible to use the PA15 pin as TIM2_CH1. (I also did the partial remap of TIM2 and diabled the JTAG interface)