AnsweredAssumed Answered

Problems with interupt-configuration

Question asked by Tom on Jul 19, 2012
Latest reply on Jul 20, 2012 by Tom
Hello,
in my Application I have got a LED which is toggled by Timer2.
When only this timer is running, the output level of the I/O pin is 3V when high.
When I additionaly activate the USART interrupt, the output level goes only up to 2,5V.
// Enable interrupt TIM2
NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 2;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
 
// Enable interrupt  USART1
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);

Can anybody explain this?

Next, when I alter the USART-code to
NVIC_InitStructure.NVIC_IRQChannelCmd = DISABLE;
the LED stops blinking and it seems, that the timer is no more running.
This should only disable the USART-interrupt, why does it impact the timer-interrupt?

Regards
Tom

Outcomes