GPIO_Init(RF_DATAGPIO, RF_DATAPIN, GPIO_MODE_IN_FL_NO_IT);
TIM2->PSCR = TIM2_PRESCALER_1;
TIM2->ARRH= 0xff;
TIM2->ARRL= 0xff;
TIM2->CCMR2|=0x01;
TIM2->CCER1|=0x10;
TIM2->CR1 |= 0x80;
TIM2->IER |= 0x05;
TIM2->CNTRH = 0;
TIM2->CNTRL = 0;
TIM2->CR1 |= 0x01;
stm8s003的,能进中断,但是CNTR和CR寄存器值为0,要捕获的输入是我自己调的方波16us,是哪的问题啊 |