|
1.既然:定时器时钟频率是其所在APB 总线频率的两倍。然而,如果相应的APB 预分频系数是1,定时器的时钟频率与所在APB 总线频率一致, 岂不是: /* PCLK1 = HCLK/2 */ RCC_PCLK1Config(RCC_HCLK_Div2); 和 /* PCLK1 = HCLK/2 */ RCC_PCLK1Config(RCC_HCLK_Div1); 所配置的定时器时钟是完全一样的,不就重复了嘛?有什么区别? 2.定时器中断配置在void NVIC_Configuration(void)函数内,有如下写法: /* Enable the TIM2 global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQChannel; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 其中NVIC_IRQChannelPreemptionPriority和NVIC_IRQChannelSubPriority在何种情况下配什么值,不是很清楚,且reference manual中没有,应该怎么解释呢? 请各位大虾多多指教,谢谢:)
|
|