RL78 - LIN communication - delay between 2 transmissions

Hi,

I'm using RL78 F13 48 pin controller with LIN.

LIN IC used is TJA1021 - Master.

2 slaves are connected to the master & in while loop in 50 ms timer interval i am trying to transmit header to both the slaves one by one to receive data.

If i add around 2.5 ms of delay between both transmissions - LIN communication is working fine.

Otherwise I'm unable to get data from LIN.

-------------------------------------------------------------------

Example: 

Works fine with a delay between 2 transmissions.

LIN_Master_HeaderTransmit(0x81);  //LIN Slave 1
for(int i =ZERO; i<=2500; i++) 
{
    Wait1us();
}
LIN_Master_HeaderTransmit(0x82);  //LIN Slave 2

----------------------------------------------------------------------

The below code does not work:

LIN_Master_HeaderTransmit(0x81);  //LIN Slave 1

LIN_Master_HeaderTransmit(0x82);  //LIN Slave 2

----------------------------------------------------------------------

We are not supposed to have a delay in the program, so kindly let me know your comments on this.

Is the delay expected ? or will it work without the delay?

Thank you.

Parents Reply
  • Inter-byte space LSC is set to 0x11

    Inter-Byte Space (Header)/ Response Space Select - 1 Tbit

    Inter-Byte Space Select - 1 Tbit

    ----

    The above delay scenario, I'm able to resolve by adding a flag and waiting for one slave communication to complete before starting the next.

    ----

    As per my understanding it is not possible to transmit data to/Receive data from same LIN slave at the same time. So, some time difference is required between both the communications when the it is the same Slave.
    Please let me know your comments on this.

    Thank you.

Children