没有用到输入输出,只要不使能定时器的输出,就不会有冲突。
勘误手册可以在ST网站查到。
香水城 发表于 2011-7-18 12:24 
有点不明白“只要不使能定时器的输出”这句话,我要用到USART1_TX,USART1_Rx就必须配置GPIO,为 /***配置USART1 RX的GPIO****/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/****配置USART1 TX的GPIO****/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
同时,我要使用TIM1,就必须要使能TIM_Cmd(TIM1, ENABLE);同时,我TIM1的TIM1_OCInitStruct.TIM_OCMode = TIM_OCMode_Timing;
TIM1_OCInitStruct.TIM_Pulse = 65535;//CaptureVal;
TIM1_OCInitStruct.TIM_OCPolarity = TIM_OCPolarity_Low;要使输出不使能,是要加上这句吗?TIM1_OCInitStruct.TIM_OutputState = TIM_OutputState_Disable ;
对于使能输出,不是很理解,还望香主指点
|