When I set DIR as 1, which means response is generated from this (master) node. After send frame use the function Std_ReturnType Lin_SendFrame(uint8_t channel, Lin_PduType *pduPtr, bool sendFrame), I can detect the INTN pin came to low level. Then, I use the function
Lin_StatusType Lin_GetStatus(uint8_t channel, Lin_PduType *pduPtr, Lin_SduType *sduPtr) to get the status and response data. The Lin_GetStatus function shows the LES is 0x00, the LS is 0x42,which means the DRBNE bit set and DTF bit set, and the data buffer is the same with what I send. The problem is that WHY was not the DRF set to 1? It's sure that the SJA1124 have received the data bytes.
Is the DRF not set when the DIR is 1?
THANKS!
Hello WangYue, are you the one who defined this function? Std_ReturnType Lin_SendFrame(uint8_t channel, Lin_PduType *pduPtr, bool sendFrame)
thanks
Hi Wang,
Please check out whether there is an error flag set.
Best regards,
Tomas
Thank you, the LES register is 0x00, which shows there were no errors detected.