LIN Implementation with LPC55S06 SDK v2.13.0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LIN Implementation with LPC55S06 SDK v2.13.0

662 次查看
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

 

标签 (1)
0 项奖励
回复
1 回复

646 次查看
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 项奖励
回复