AnsweredAssumed Answered

Conflict between remapped TMR2 and remapped SPI1 in STM32F103

Question asked by el_alami.fadi on Oct 27, 2015
Latest reply on Oct 27, 2015 by Clive One
I am Facing a problem to use TMR2 and SPI3 in STM32F103. I am using Keil Software to write the code and the Problem is if i remap and choose SPI1 TMR2 will stop working and if i stop using the remapped SPI1; the remapped TMR2 will work. The pins i am using for the Remapped SPI1 is PB3/B4/B5 and the pin that i am using for the remapped TMR2 is PA15. This is a sample code for how i am declaring these pins:

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA |RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_SPI1 | RCC_APB2Periph_AFIO, ENABLE );

GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);

RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);

GPIO_PinRemapConfig(GPIO_PartialRemap1_TIM2,ENABLE);

GPIO_PinRemapConfig (GPIO_Remap_SPI1, ENABLE);

Outcomes