6 Replies Latest reply on Sep 8, 2020 8:23 AM by kako_4288106

    LIN communication with several Slaves using the same software

    kako_4288106

      Hi, I am looking for help,

       

      I am currently working on a project that uses LIN for communication, currently there are several slave boards using the same software.

      When the Master sends a write I want all the boards to react, but when the Master sends a read request I only want one of the boards to reply, the board to reply will be based on a switch configuration.

      Using the Cypress LIN Slave 5.0 module the issue is that I don't have control over the reply, when each of the boards sees the corresponding Frame ID coming in they all attempt to reply to it.

       

      All the boards must use the same software therefore the LIN frames are all set up inside the LIN module, but I was unable to find a way to disable the either the reply or the reply frame itself once the code is running.

       

      I am looking for help, if there is a function that will resolve the problem or a recommendation for a work around.

       

      Regards

      Kamil

        • 1. Re: LIN communication with several Slaves using the same software
          LePo_1062026

          Kamil,

           

          You have the same dilemma ALL LIN connected devices have that run the same SW.   The proper way to resolve this is that every Slave Node must have their own NAD (Node Address for Diagnostics).  How does a node acquire a unique NAD?  That's where it can get complicated.

           

          Method #1

          Each Slave Node system must be HW unique.  This is the normal LIN strategy.  In this case, all nodes are assigned a unique NAD at system design-time.   The NAD usually assigned and loaded in a non-Volatile memory (FLASH or EEPROM) at manufacture-time.  If more than one Slave node has the same HW design it can be possible at the time of manufacture to force a separate system assigned NAD into EEPROM.  However this will require a different part number so that when installed on the system, it must be installed at a specific location on the LIN bus.

           

          This is the best method if node position or function must be rigidly determined in the system.   For example:  Let's say you have a vehicle system where 5 identical HW and SW LIN Slave Door nodes are connected.  Each LIN slave is positioned in specific locations in the vehicle.   A specific NAD address is assigned based on the Door location.   Having LIN nodes with the same NAD is a "No-no".  Placing LIN nodes with specific NADs in the wrong location in the vehicle is a "No-no".

           

          Method #2

          This method can be used but MUST be agreed upon with the system LIN master to implement!  This method uses a "anti-collisiion" strategy to allow a unique NAD to be assigned at factory assemble-time.  If this technique is implemented successfully, each Slave node will be assigned a unique NAD but there is NO positional or functional dependence.  If positional or functional dependence is needed, you must use Method #1.

           

          Len

          • 2. Re: LIN communication with several Slaves using the same software
            kako_4288106

            Len,

             

            Appreciate your feedback,

             

            I was unfortunately hoping for a crude software solution along the lines of manually ignoring the Master request, or removing the reply LIN frame during operation based on switch orientation from the boards that I don't want replying.

             

            I will investigate the methods you mentioned,

             

            Thank you

             

            Kamil

            • 3. Re: LIN communication with several Slaves using the same software
              LePo_1062026

              Kamil,

               

              There is a third method that is a derivation of Method #1.

               

              Before I share it with you, can you answer the following questions:

              • LIN is commonly used for automotive designs.  It is uncommon for commercial or industrial uses.  Is it for automotive?
              • How many HW identical LIN slave nodes are intended to be on the exact same LIN bus at the same time?

              Len

              • 4. Re: LIN communication with several Slaves using the same software
                kako_4288106

                Len,

                 

                     - It is actually for commercial use, associated with electrical heating

                     - There are a minimum of two identical LIN slave nodes, depending on size of product this can be a maximum of six.

                 

                Kamil

                • 5. Re: LIN communication with several Slaves using the same software
                  LePo_1062026

                  Kamil,

                   

                  Method #1.1

                  Method #1 assumes the HW for each LIN node is in effectively different.  This can be accomplished by inserting a unique NAD at manufacturing-time and getting it a part number that infers the NAD difference.   To use this style of the method means that on a LIN bus, no two LIN slaves with the same part number (ie. NAD) can be on the bus at the same time.   If a node goes down later, the same part number must be used to replace the 'broken' slave.

                   

                  One way to avoid special NAD programming on the manufacturing line and the unique part number is to add a 'virtual' HW difference for each node.

                   

                  For example, let's say you install 6 identical Slave nodes on the same LIN bus with the same build HW and SW.  It also has the same part number. 

                   

                  A sub-method is to place a 3-switch dip switch on each unit and the system installer needs to select 1 out of 8 combinations of the 3 switches to uniquely address each slave node.  This becomes the base of your NAD for each node individual access. 

                   

                  This allows you to replace nodes at will by setting the same 3-switch on the new node to the setting of the old node.

                   

                  Will this be an acceptable method for your application?

                   

                  Len

                  • 6. Re: LIN communication with several Slaves using the same software
                    kako_4288106

                    Len,

                     

                    Yes that would be an acceptable method

                     

                    Thank you for the help

                     

                    Regards Kamil