2020-04-06 07:30 AM
I combined 2 examples. USART3 I/O and SYSTICKS timer.
When I receive a USART interrupt the Systicks stops working. There is a endless loop of interrupt calls of USART3. So I assume I didn't acknowledge the interrupt correctly. Only can't also find it in the example or in the limited documentation I found about the LL_Drivers how to acknowledge an interrupt.
Any suggestion where to look?
Thanks.
2020-04-07 07:19 PM
Read the status register, find any flag bit that you don't expect or don't handle. Especially, RX overrun.
The reference manual describes how to dismiss every interrupt reason bit.
LL functions can be handy when you read the manual and understand what each bit does.
But some argue that then you could manipulate the registers directly as well... so it's a matter of taste.
-- pa
2020-04-07 08:06 PM
If you want SysTick to keep firing, you might always want to put SysTick at a numerically lower priority than the USART interrupts. This will allow it to continue firing when other ISRs are active. Though it's not good form in general to rely on SysTicks within an interrupt.
2020-04-09 06:44 AM
If i added LL_USART_ClearFlag_ORE(USART3); in the interupt function. this fixed the problem. only I don't understand why i got a overrun error I'm only sending one character.
Edit: Solved the APB divider was not correct.