Conflict between remapped TMR2 and remapped SPI1 in STM32F103
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-27 4:28 AM
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);
#spi1 #stm32f103r8 #tmr2- Labels:
-
SPI
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-27 5:45 AM
May be you should consider a different STM32 family that permits PIN level peripheral configuration? The F1 uses a course block level for groups of pins, and this can be significantly more difficult to escape all the peripherals in the manner you want.
Up vote any posts that you find helpful, it shows what's working..
