This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570ls1227PGE Proplem with LIN Communication

Other Parts Discussed in Thread: HALCOGEN

Hello,

Im using this MicroController as a LIN-Master. i used Halcogen to generate the Code.

      linInit();

      linSendWakupSignal(linREG);  

     while(1)

     {

     linSendHeader(linREG,0xB1);

     //while(!linIsRxReady(linREG));

     // linGetData(linREG, (uint8_t * const) LIN_RX_data);

     }

The Problem is, the MCU doesnt send a Header till i switch the Slave to Master and send a Header from the LIN-Device with the ID 0xB1 to the TMS.   Then the TMS starts sending till the next reset.

Im trying to fix this since 4 Days.

Can you help me please

  • Moataz,

    Really can't tell how the lin is configured from just the code posted. Most of the work is done in lin init.

    Also you mention that you are trying to use lin master - but you have to switch from slave to master before the header is sent.  I guess I don't understand this especially.

     

  • Hello ,

    thanks for your answer. 

    I mean im trying to use the TMS as a LIN Master. When i send a Header with the ID 0xB1. i get just the Signal in the following Image from the TX-Wire. i send the signal permanently in aloop with 10 ms between each Header. The Slave doesnt receive the Header.

    I switched (for testing) the Slave in Master Mode and send from it the same ID 0xB1 to the TMS, which still in Master Mode too. then the TMS stoped sending the pulse in the Picture and started to send normaly with the right Header. after that i switched the device to Slave-Mode (the TMS still sending) and it started to receive the Headers

    The TMS Master can not send any Header, till i  switch the slave device to Master mode and send aheader from it to the TMS with the same ID, which the Master should send. Then the TMS starts to send correctly. I cant understand that behavior.

    In the attatchment are the LIN C and Header files.

    2046.lin.h6545.lin.c

  • Hi Moataz,

    Sorry I should have asked this question first,  I don't know much about lin so didnt' think of it, but after consulting w. Jean-Marc - we thought we should ask if you've got LIN transceivers in your setup.  There's a loopback from TX to RX in the transceiver and if this is missing it might explain what you are seeing.

    We don't have a LIN transceiver on our HDK boards, so you'd need to add one to use it in LIN mode.

     

  • Hi Moataz,

    I am working on same problem.
    How did you fix the problem?

    Regards,
    Neeraj