Dear, I am using S32K144 SDK RTM3.0,with FlexCAN and LPUART module,when I recieve can Msg, then tx using lpuart1, my problem:
1) I cant tx data twice using lpuart
2) I cant using the global varible in the while(1) loop
attachment is my project,thank you first
已解决! 转到解答。
Hello wdong
The function LPUART_DRV_SendData() is a non-blocking function, this means that the when you execute another function the transmission will be still on course. To avoid this you may check if the bus is busy before calling the second TX or use the function LPUART_DRV_SendDataBlocking().
The LPUART_DRV_SendDataBlocking() does not return until the transmit is complete.
Could you explain in detail the point 2? ("I cant using the global variable in the while(1) loop")
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar
Hello wdong
The function LPUART_DRV_SendData() is a non-blocking function, this means that the when you execute another function the transmission will be still on course. To avoid this you may check if the bus is busy before calling the second TX or use the function LPUART_DRV_SendDataBlocking().
The LPUART_DRV_SendDataBlocking() does not return until the transmit is complete.
Could you explain in detail the point 2? ("I cant using the global variable in the while(1) loop")
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar