i am building a project with lpuart_lin ,using RTD,but i did not found the api about receive data, what i can find like this only in Lpuart_Lin_Ip.c,but they are static ,
what api function could i use to receive data or send data?
thank you
Hi @zq1,
Please specify the MCU part.
Is the MCU used as LIN Master or Slave?
The static function you mentioned is called from the LIN interrupt handler, and it calls a callback function at the end.
It was discussed here:
Regards,
Daniel
thank you very much, the mcu is S32K312, s32k1XX i had finished my project 3 months ago,the S32K3 is much different with S32K1xx,
Hi @zq1,
There are S32K3xx RTD examples you can refer to.
As I said, you need to use the callback.
Regards,
Daniel
first of all, thank you very much, but there is still a problem i did not work out, my lpuart_lin can send frame,but can not receive data,the case LPUART_LIN_IP_RX_COMPLETED can not enter
Could you confirm my understanding about your issue as below diagram:
Your LIN frame is sent from MASTER, and the Response field is from Master
In Slave side, you used LIN_Callback() to receive data. And your current issue is this LIN_Callback cannot reach LPUART_LIN_IP_RX_COMPLETED state?
Furthermore, I saw in your code that after receive Header, you will call this function to store data:
Lpuart_Lin_Ip_SendFrame(INST_LIN2, &LinLpuartPdu);
What is parameters of LinLpuartPdu? Because I expect that LinLpUartPdu should have parameter LIN_FRAMERESPONSE_RX to receive data
Lpuart_Lin_Ip_SendFrame(INST_LIN2, &LinLpuartPdu); this function is to send data?not receive data?
This function receive data when LinLpuartPdu has parameter LIN_FRAMERESPONSE_RX