Hi nxf46116,
thanks for your input and I think I managed to get it to work. The application is now running over a day twice, which will not be a use case at all and as a result, I can mark it fixed "for me".
Besides the interrupts of the two UARTs (1) + (2) I have furthermore an interrupt for an input GPIO (3), an interrupt for a PWM (4) and the CAN interrupt which I mentioned above (5). What solved the issue here was changing the interrupt priorities via
NVIC_SetPriority(..., n).
In Detail:
| Interrupt | priority (erroneous case) | priority (working case) |
|---|
| UART0_IRQn | ( 0x01<<3 ) | 0x01 = 9 | 14 |
| UART1_IRQn | 5 | 14 |
| EINT2_IRQn | 5 | 14 |
| CAN_IRQn | 2 | 14 |
| PWM1_IRQn | ( 0x01<<3 ) | 0x01 = 9 | 14 |
I do not use any priority grouping (pre-empting), however, I cannot explain why this (obviously) fixed my faulty application. Any idea?