LIN Implementation with LPC55S06 SDK v2.13.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LIN Implementation with LPC55S06 SDK v2.13.0

280 Views
preither
Contributor I

Hi everyone,

i just tried to update the SDK for the LPC55S06 from v2.10.0 to v2.13.0.

Here I entcounterd the following problem:

I use the fsl_uart driver for LIN communication. After the update I now have the problem that I no longer receive the first byte (the LIN sync field) after receiving a LIN break condition.

After some research i found out the following: In file "fsl_usart.c" an additional check has been implemented in function "USART_TransferHandleIRQ", which checks if the "framing error interrupt flag" is set before the received data is processed. If this check is positive, the complete receive FIFO is deleted in line 1160. Every received break triggers a framing error (even with activated LIN mode) and thus the problem described above occurs, because the next byte is already in the FIFO.

So does it really make sense to empty the complete receive FIFO in case of a framing error? In my opinion a correct LIN implementation is not possible with the new driver, or am I missing something?

Here are the codlines from the driver which lead to the problem:

 

 /* If framing error. */
    if ((base->STAT & USART_STAT_FRAMERRINT_MASK) != 0U)
    {
        /* Clear rx error state. */
        base->STAT |= USART_STAT_FRAMERRINT_MASK;
        /* clear rxFIFO */
        base->FIFOCFG |= USART_FIFOCFG_EMPTYRX_MASK;
        /* Trigger callback. */
        if (handle->callback != NULL)
        {
            handle->callback(base, handle, kStatus_USART_FramingError, handle->userData);
        }
    }

 

 

Thanks for your help

Pascal

 

Labels (1)
0 Kudos
1 Reply

264 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, let me review your information and when I have more details I will feedback.

Best regards,
Pavel

0 Kudos