Hello Robin,
I did some tests to understand what's happened. But let me explain you, before, how my interruption function is built:
void LPUART0_RxTx_IRQHandler(void)
{
/* Check if error */
{
/* Clear the error/interrupt flags */
LPUART0->STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;
return;
}
if ( Check if data received )
{
/* Save data received in buffer */
}
if ( Check if data transmited finished )
{
/* check if other data to send */
/* If yes, load data transmitted register with new */
}
/* Clear the error/interrupt flags */
LPUART0->STAT = FEATURE_LPUART_STAT_REG_FLAGS_MASK;
}
To test the SW behaviors, I use a µc pin the check in real time
See below the tests done:
1 - Remove watchdog
When the glith occurs, and without watchdog, the UART interruption is called continously (infinitely)
2 - In debug mode
When the glitch occurs, the STAT register is
STAT = 0x50FAC000 (flags :RXEDGI, RXINV, RWUID, BRKDE, LBKDE, RAF, OR, FE, MA1F & MA2F)
after clear register:
STAT = 0x10F00000
3 - Interrupt function
When the glith occurs, the interruption function is called permanently up to watchdog --> Not normal
4 - Error data
When the glith occurs, the Error data is detected only one time --> Normal it is only one glitch
5 - Received data
When the glith occurs, the received data is detected one time --> Not normal, why read data if it is an error ?
6 - Transmited data
When the glith occurs, the transmited data are sent correctly --> Normal
I hope my tests will help you in your analyse.
Have a nice day
Sebastien