Missing update/compare interrupts from same timer
Hi, I'm evaluating the STM8 UART emulation library (STSW-STM8051). I'm using the STM8SVLDISCOVERY board. Instead of the TIM3 I'm using the TIM2 timer since the TIM3 is not available on the STM8S003K3: I configured the project to communicate at a baudrate of 19200bps 8N1. The library uses both UPDATE and CAPTURE/COMPARE interrupts from the same timer. It seems that if the two interrupt flags are set in the same time only one ISR is serviced; it seems that only one interrupt from the same peripheral is serviced while the second one is not kept in queue. I have tried also with different priorities without success. The problem seems to arise if the second interrupt flag is set while the first ISR is evaluating the TIMx->SR1 register and clearing the flag (therefore if the compare register value is near the autoreload value).
In the errata this issue is not described. Can you please tell me what can I do to solve the problem? This problem must be solved to allow for full-duplex communication with the sw emulation library.
Thank you, best regards.
