Solved
It isn`t the output compare TIM1`s signal (stm32f103c8t6).
Posted on September 23, 2017 at 13:19
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.
&sharpinclude <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!
#stm32f103-tim1