stm32f103芯片:关于定时器的问题 如果配置三个定时器的话NVIC_PriorityGroupConfig(NVIC_PriorityGroup_x)是不是应该配成NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2)???例如: NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 并且 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);只用写一次就行,而不用每个中断都写?? |
回复:stm32f103能够同时用三个定时器吗?好心人解答一下!
回复:stm32f103能够同时用三个定时器吗?好心人解答一下!
RE:stm32f103能够同时用三个定时器吗?好心人解答一下!
RE:stm32f103能够同时用三个定时器吗?好心人解答一下!