AnsweredAssumed Answered

Questions about S32K1xx DEMO:lin_master_baremetal

Question asked by longsheng liao on Feb 21, 2020
Latest reply on Feb 26, 2020 by Hung Nguyen Phi

I want to know S32K1xx LIN Send Header,  the principle of send PID? 

I found below function will sent PID: LIN_LPUART_DRV_ProcessFrameHeader(**) which local in function LIN_LPUART_DRV_ProcessFrame(***)  ,this function is only called in LIN IRQ function:LIN_LPUART_DRV_IRQHandler(***),detail code is:

                if (LPUART_GetStatusFlag(base, LPUART_RX_DATA_REG_FULL))
                    /* Get data from Data Register & Clear LPUART_RX_DATA_REG_FULL flag */
                    LPUART_Getchar(base, &tmpByte);
                    /* Process data in Data Register while receive, send data */
                    LIN_LPUART_DRV_ProcessFrame(instance, tmpByte);


if (***statement is true only if the LPUART_RX_DATA_REG_FULL flag is set,  but why this flag can be set when Master sent  sync field  successed . Did the Slave send data to the master at this time(Master sent  sync field  successed)? otherwise,I think LPUART_RX_DATA_REG_FULL  can not be set  automatically。