UART receiving problem (using interrupts)
Hello everyone,
I am facing a issue I can't explain.
I am migrating a code from F1 to F2.
I am using UART4. If I only use this peripheral I can send and receive data and everything work well.
Then I am using a the TIM6 to have a 2ms counter.
In the IRQ of the timer I only do this (minimal code to find the bug).
void TIMER_LCD_IRQHandler(void)
{
if (TIM_GetITStatus(TIMER_LCD, TIM_IT_Update) != RESET)
{
TIM_Cmd(TIMER_LCD, DISABLE);
TIM_ClearITPendingBit(TIMER_LCD, TIM_IT_Update);
TIM_Cmd(TIMER_LCD, ENABLE);
}
}
Now with this activation I am loosing data in UART reception. If I comment the TIM_Cmd line everything work well.
This code is working well on the STM32F1. But on the STM32F2 from time to time I loose some data from my UART reception (throught interrupt).
I don't understand the issue because there is no interraction between those 2 peripheral.
I guess I'm missing something about the interrupts.
Does someone have an idea of what the issue could be ?
Thank you for your help !