LSS (Layer Setting Services) allows the node-ID and bit timing of a CANopen device to be configured over the CAN bus without hardware switches. An LSS controller (master) addresses one or more LSS devices (slaves) and sets the following parameters:
- Node-ID (NMT address)
- Bit timing parameters (nominal bit rate)
- LSS address (Identity Object, Index 1018h)
- Note
- This module is only compiled when COS_LSS_SUPPORT is set to 1 in
cos_conf.h. When LSS is active, CosMgrGetNodeId() must read the node-ID from non-volatile memory if no hardware switch is fitted (see cos_user.c for an example).
LSS configuration flow
A typical LSS node-ID assignment sequence is:
- The LSS controller selects the target device either globally (Switch Mode Global) or by its LSS address (Switch Mode Selective, using the four sub-indices of Identity Object 1018h).
- The device enters LSS Configuration mode. SDO, PDO, and NMT communication are inhibited during this phase.
- The LSS controller sends a Configure Node-ID command. The device validates the new node-ID and replies with a result code.
- Optionally the LSS controller sends a Configure Bit Timing command.
- The LSS controller sends a Store LSS Parameter command. The device saves the new node-ID (and optionally bit rate) to non-volatile memory.
- The LSS controller switches the device back to LSS Waiting mode.
- A Reset Node (NMT command 81h) or power cycle applies the stored settings.
- Note
- Further reading: Application Note AN1204 — CANopen LSS configuration