AnsweredAssumed Answered

It isn`t the output compare TIM1`s signal (stm32f103c8t6).

Question asked by Andrew Androsow on Sep 23, 2017
Latest reply on Sep 28, 2017 by Andrew Androsow

Hello! I try to program stm32f103c8t6 TIM1 in output compare mode (connecting it to  PA8 pin).But PA8 doesn`t have any signal.In  Keil`s debugger the timer running. 

#include <stm32f10x.h>
void main(void)
{
RCC->APB2ENR |= RCC_APB2ENR_IOPAEN;
RCC->APB2ENR |= RCC_APB2ENR_IOPBEN;
RCC->APB2ENR |= RCC_APB2ENR_TIM1EN ;
GPIOB ->CRH = GPIO_CRH_CNF13_1 | GPIO_CRH_MODE13;

GPIOA->CRH = GPIO_CRH_CNF8_1 | GPIO_CRH_MODE8;

TIM1->CCMR1 = TIM_CCMR1_OC1PE|TIM_CCMR1_OC1M_0 |TIM_CCMR1_OC1M_1 ;
TIM1->CCER=TIM_CCER_CC1E;
TIM1->ARR = 0x0FFF;
TIM1->PSC = 0x000A;
TIM1->CCR3 = 0x0000;
TIM1->CR1 |= TIM_CR1_CEN|TIM_CR1_ARPE;
while(1)
{

}

}

 

 P.S.  Width TIM2 this code running well.

 

Thank for answer!

Outcomes