Digital addressable lighting interface - Part 105: Particular requirements for control gear and control devices - Firmware Transfer

IEC 62386-105:2020 applies to control gear and control devices.
Typically, a bus unit according to IEC 62386 (all parts) contains firmware. There are circumstances where it might be necessary to change the firmware after production or shipping of the product. For example if the bus unit does not operate as intended. In such a case, a firmware update of a bus unit via the interface is beneficial.
This firmware update process is primarily designed to be a bug fix process, not a feature extension process. Nevertheless the firmware update process can be used for feature extensions. But it is important that the risk of negative effects to the complete system is considered in detail.

Interface d'éclairage adressable numérique - Partie 105: Exigences particulières pour appareillages et dispositifs de commande - Transfert du microprogramme

L’IEC 62386-105:2020 s’applique aux appareillages et dispositifs de commande.
Un appareillage de bus conforme à l'IEC 62386 (toutes les parties) contient généralement un microprogramme. Il peut être nécessaire dans certaines circonstances de modifier ce microprogramme après la production ou l’expédition du produit, par exemple lorsque l’appareillage de bus ne fonctionne pas comme prévu. Dans ce cas, il est bénéfique de mettre à jour le microprogramme de l’appareillage de bus par l’intermédiaire de l’interface.
Ce processus de mise à jour du microprogramme est principalement conçu comme un processus de correction des bogues et non comme un processus d'extension de caractéristiques. Le processus de mise à jour du microprogramme peut néanmoins être utilisé pour l’extension des caractéristiques. Il est important cependant d'étudier en détail le risque d’effets négatifs sur le système entier.

General Information

Status
Published
Publication Date
25-Mar-2020
Technical Committee
TC 34 - Lighting
Drafting Committee
WG 11 - TC 34/WG 11
Current Stage
DELPUB - Deleted Publication
Start Date
12-Dec-2024
Completion Date
29-Jul-2022

Relations

Effective Date
05-Sep-2023

Overview

IEC 62386-105:2020 is an international standard published by the International Electrotechnical Commission (IEC) that defines specific requirements for firmware transfer in control gear and control devices within digital addressable lighting interface (DALI) systems. This part of the IEC 62386 series addresses the essential protocols and processes for performing firmware updates through the DALI interface. Primarily intended for bug fixing, the firmware transfer mechanism can also be applied for feature extensions, although with careful risk assessment to prevent adverse effects on the overall lighting control system.

The standard complements other parts of the IEC 62386 series, such as Part 101 for system components, Part 102 for control gear general requirements, and Part 103 for control devices, providing a cohesive framework for scalable and interoperable lighting control solutions.

Key Topics

  • Firmware Update Process
    Specifies detailed procedures for initiating, transmitting, and completing firmware updates over the DALI bus. This includes the start command, data packet transfer, error detection, and recovery mechanisms to ensure reliability and system stability during updates.

  • Transmission Protocol Structure
    Defines the encoding and timing of commands using a 32-bit forward frame format to ensure robust communication between bus units and the updating entity.

  • Security and Error Recovery
    Highlights security considerations and safety checks during the update process, minimizing risks of system malfunction due to corrupted or incomplete firmware loads.

  • Persistent Variables Management
    Describes how certain device variables should be handled during updates to maintain system consistency after a firmware change.

  • Firmware Versioning
    Provides mechanisms to declare and verify firmware version numbers to track updates and ensure compatibility across system components.

  • Command Sets
    Enumerates standard and data transfer commands utilized for firmware management within the lighting control network, ensuring interoperability.

  • Update Process Examples and Checklists
    Includes informative annexes with practical example flows and management check sheets for implementation guidance.

Applications

IEC 62386-105:2020 is critical for manufacturers, integrators, and maintenance personnel involved in digital lighting control systems where remote and secure firmware upgrades are essential for:

  • Improving Lighting System Reliability
    Facilitates bug fixes and stability improvements after production or deployment.

  • Extending Device Functionality
    Enables controlled feature upgrades to enhance product capabilities while managing system risk.

  • Field Maintenance and Support
    Allows for onsite firmware updates via the DALI interface without physical device replacement, saving maintenance costs and minimizing downtime.

  • Smart Building and IoT Lighting Solutions
    Supports integration with intelligent lighting infrastructure that demands continuous software improvements and compliance with international standards.

Related Standards

IEC 62386-105:2020 should be used in conjunction with other related standards in the IEC 62386 series:

  • IEC 62386-101: General requirements for system components in DALI systems.
  • IEC 62386-102: General requirements for control gear.
  • IEC 62386-103: General requirements for control devices.
  • IEC 62386-2xx: Particular requirements for various types of control gear.
  • IEC 62386-3xx: Particular requirements for various types of control devices.

Adherence to these complementary standards ensures a comprehensive and interoperable lighting control environment that supports efficient firmware management, system safety, and future scalability.


IEC 62386-105:2020 plays a pivotal role in maintaining the integrity and longevity of digital lighting systems through standardized, secure firmware transfer protocols. Its adoption enables manufacturers and system integrators to deliver reliable, upgradeable, and high-performance lighting control solutions in line with international best practices.

Standard

IEC 62386-105:2020 - Digital addressable lighting interface - Part 105: Particular requirements for control gear and control devices - Firmware Transfer

English and French language
51 pages
sale 15% off
Preview
sale 15% off
Preview

Frequently Asked Questions

IEC 62386-105:2020 is a standard published by the International Electrotechnical Commission (IEC). Its full title is "Digital addressable lighting interface - Part 105: Particular requirements for control gear and control devices - Firmware Transfer". This standard covers: IEC 62386-105:2020 applies to control gear and control devices. Typically, a bus unit according to IEC 62386 (all parts) contains firmware. There are circumstances where it might be necessary to change the firmware after production or shipping of the product. For example if the bus unit does not operate as intended. In such a case, a firmware update of a bus unit via the interface is beneficial. This firmware update process is primarily designed to be a bug fix process, not a feature extension process. Nevertheless the firmware update process can be used for feature extensions. But it is important that the risk of negative effects to the complete system is considered in detail.

IEC 62386-105:2020 applies to control gear and control devices. Typically, a bus unit according to IEC 62386 (all parts) contains firmware. There are circumstances where it might be necessary to change the firmware after production or shipping of the product. For example if the bus unit does not operate as intended. In such a case, a firmware update of a bus unit via the interface is beneficial. This firmware update process is primarily designed to be a bug fix process, not a feature extension process. Nevertheless the firmware update process can be used for feature extensions. But it is important that the risk of negative effects to the complete system is considered in detail.

IEC 62386-105:2020 is classified under the following ICS (International Classification for Standards) categories: 29.140.50 - Lighting installation systems; 29.140.99 - Other standards related to lamps. The ICS classification helps identify the subject area and facilitates finding related standards.

IEC 62386-105:2020 has the following relationships with other standards: It is inter standard links to IEC 62386-105:2024. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.

You can purchase IEC 62386-105:2020 directly from iTeh Standards. The document is available in PDF format and is delivered instantly after payment. Add the standard to your cart and complete the secure checkout process. iTeh Standards is an authorized distributor of IEC standards.

Standards Content (Sample)


IEC 62386-105 ®
Edition 1.0 2020-03
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Digital addressable lighting interface –
Part 105: Particular requirements for control gear and control devices –
Firmware transfer
Interface d’éclairage adressable numérique –
Partie 105: Exigences particulières pour appareillages et dispositifs de
commande – Transfert du microprogramme

All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form
or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from
either IEC or IEC's member National Committee in the country of the requester. If you have any questions about IEC
copyright or have an enquiry about obtaining additional rights to this publication, please contact the address below or
your local IEC member National Committee for further information.

Droits de reproduction réservés. Sauf indication contraire, aucune partie de cette publication ne peut être reproduite
ni utilisée sous quelque forme que ce soit et par aucun procédé, électronique ou mécanique, y compris la photocopie
et les microfilms, sans l'accord écrit de l'IEC ou du Comité national de l'IEC du pays du demandeur. Si vous avez des
questions sur le copyright de l'IEC ou si vous désirez obtenir des droits supplémentaires sur cette publication, utilisez
les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pays de résidence.

IEC Central Office Tel.: +41 22 919 02 11
3, rue de Varembé info@iec.ch
CH-1211 Geneva 20 www.iec.ch
Switzerland
About the IEC
The International Electrotechnical Commission (IEC) is the leading global organization that prepares and publishes
International Standards for all electrical, electronic and related technologies.

About IEC publications
The technical content of IEC publications is kept under constant review by the IEC. Please make sure that you have the
latest edition, a corrigendum or an amendment might have been published.

IEC publications search - webstore.iec.ch/advsearchform Electropedia - www.electropedia.org
The advanced search enables to find IEC publications by a The world's leading online dictionary on electrotechnology,
variety of criteria (reference number, text, technical containing more than 22 000 terminological entries in English
committee,…). It also gives information on projects, replaced and French, with equivalent terms in 16 additional languages.
and withdrawn publications. Also known as the International Electrotechnical Vocabulary

(IEV) online.
IEC Just Published - webstore.iec.ch/justpublished
Stay up to date on all new IEC publications. Just Published IEC Glossary - std.iec.ch/glossary
details all new publications released. Available online and 67 000 electrotechnical terminology entries in English and
once a month by email. French extracted from the Terms and Definitions clause of
IEC publications issued since 2002. Some entries have been
IEC Customer Service Centre - webstore.iec.ch/csc collected from earlier publications of IEC TC 37, 77, 86 and
If you wish to give us your feedback on this publication or CISPR.

need further assistance, please contact the Customer Service

Centre: sales@iec.ch.
A propos de l'IEC
La Commission Electrotechnique Internationale (IEC) est la première organisation mondiale qui élabore et publie des
Normes internationales pour tout ce qui a trait à l'électricité, à l'électronique et aux technologies apparentées.

A propos des publications IEC
Le contenu technique des publications IEC est constamment revu. Veuillez vous assurer que vous possédez l’édition la
plus récente, un corrigendum ou amendement peut avoir été publié.

Recherche de publications IEC - Electropedia - www.electropedia.org
webstore.iec.ch/advsearchform Le premier dictionnaire d'électrotechnologie en ligne au
La recherche avancée permet de trouver des publications IEC monde, avec plus de 22 000 articles terminologiques en
en utilisant différents critères (numéro de référence, texte, anglais et en français, ainsi que les termes équivalents dans
comité d’études,…). Elle donne aussi des informations sur les 16 langues additionnelles. Egalement appelé Vocabulaire
projets et les publications remplacées ou retirées. Electrotechnique International (IEV) en ligne.

IEC Just Published - webstore.iec.ch/justpublished Glossaire IEC - std.iec.ch/glossary
Restez informé sur les nouvelles publications IEC. Just 67 000 entrées terminologiques électrotechniques, en anglais
Published détaille les nouvelles publications parues. et en français, extraites des articles Termes et Définitions des
Disponible en ligne et une fois par mois par email. publications IEC parues depuis 2002. Plus certaines entrées
antérieures extraites des publications des CE 37, 77, 86 et
Service Clients - webstore.iec.ch/csc CISPR de l'IEC.

Si vous désirez nous donner des commentaires sur cette
publication ou si vous avez des questions contactez-nous:
sales@iec.ch.
IEC 62386-105 ®
Edition 1.0 2020-03
INTERNATIONAL
STANDARD
NORME
INTERNATIONALE
colour
inside
Digital addressable lighting interface – –

Part 105: Particular requirements for control gear and control devices –

Firmware transfer
Interface d’éclairage adressable numérique – –

Partie 105: Exigences particulières pour appareillages et dispositifs de

commande – Transfert du microprogramme

INTERNATIONAL
ELECTROTECHNICAL
COMMISSION
COMMISSION
ELECTROTECHNIQUE
INTERNATIONALE
ICS 29.140.50; 29.140.99 ISBN 978-2-8322-8020-1

– 2 – IEC 62386-105:2020 © IEC 2020
CONTENTS
FOREWORD . 4
INTRODUCTION . 6
1 Scope . 7
2 Normative references . 7
3 Terms and definitions . 7
4 General . 8
4.1 General . 8
4.2 Transmitters and receivers in bus units . 8
4.3 Logical units in a bus unit . 8
5 Electrical specification . 8
6 Interface power supply . 8
7 Transmission protocol structure . 8
7.1 General . 8
7.2 32 bit forward frame encoding . 9
8 Timing . 9
9 Method of operation . 9
9.1 General . 9
9.2 Data transmission . 9
9.3 Duration . 9
9.4 Security . 10
9.5 Firmware update features . 10
9.6 Update process . 10
9.6.1 Start firmware update . 10
9.6.2 Data transfer . 10
9.6.3 Persistent variables during firmware update . 12
9.6.4 Firmware version number . 13
9.6.5 Firmware update in a system . 13
9.6.6 Error recovery. 13
10 Declaration of variables . 13
11 Definition of commands . 14
11.1 General . 14
11.2 Overview sheets . 14
11.3 Commands . 16
11.3.1 General . 16
11.3.2 Standard commands . 16
11.3.3 Data transfer commands . 17
Annex A (normative) Update file description . 19
Annex B (normative) CRC16 Calculation . 20
Annex C (informative) Firmware update process example . 21
Annex D (informative) Firmware update management check sheet . 23

Figure 1 – IEC 62386 graphical overview . 6
Figure C.1 – Example of a firmware update process . 21

Table 1 – 32-bit command frame encoding . 9
Table 2 – Firmware update features . 10
Table 3 – Block 0 definitions . 11
Table 4 – Block 1.n definitions . 12
Table 5 – Declaration of additional variables . 14
Table 6 – Standard commands for bus units with firmware update capability . 15
Table 7 – Data transfer commands for bus units with firmware update capability . 15

– 4 – IEC 62386-105:2020 © IEC 2020
INTERNATIONAL ELECTROTECHNICAL COMMISSION
____________
DIGITAL ADDRESSABLE LIGHTING INTERFACE –

Part 105: Particular requirements for control gear and control devices –
Firmware transfer
FOREWORD
1) The International Electrotechnical Commission (IEC) is a worldwide organization for standardization comprising
all national electrotechnical committees (IEC National Committees). The object of the IEC is to promote
international co-operation on all questions concerning standardization in the electrical and electronic fields. To
this end and in addition to other activities, IEC publishes International Standards, Technical Specifications,
Technical Reports, Publicly Available Specifications (PAS) and Guides (hereafter referred to as "IEC
Publication(s)"). Their preparation is entrusted to technical committees; any IEC National Committee interested
in the subject dealt with may participate in this preparatory work. International, governmental and non-
governmental organizations liaising with the IEC also participate in this preparation. IEC collaborates closely
with the International Organization for Standardization (ISO) in accordance with conditions determined by
agreement between the two organizations.
2) The formal decisions or agreements of IEC on technical matters express, as nearly as possible, an international
consensus of opinion on the relevant subjects since each technical committee has representation from all
interested IEC National Committees.
3) IEC Publications have the form of recommendations for international use and are accepted by IEC National
Committees in that sense. While all reasonable efforts are made to ensure that the technical content of IEC
Publications is accurate, IEC cannot be held responsible for the way in which they are used or for any
misinterpretation by any end user.
4) In order to promote international uniformity, IEC National Committees undertake to apply IEC Publications
transparently to the maximum extent possible in their national and regional publications. Any divergence
between any IEC Publication and the corresponding national or regional publication shall be clearly indicated in
the latter.
5) IEC provides no marking procedure to indicate its approval and cannot be rendered responsible for any
equipment declared to be in conformity with an IEC Publication.
6) All users should ensure that they have the latest edition of this publication.
7) No liability shall attach to IEC or its directors, employees, servants or agents including individual experts and
members of its technical committees and IEC National Committees for any personal injury, property damage or
other damage of any nature whatsoever, whether direct or indirect, or for costs (including legal fees) and
expenses arising out of the publication, use of, or reliance upon, this IEC Publication or any other IEC
Publications.
8) Attention is drawn to the normative references cited in this publication. Use of the referenced publications is
indispensable for the correct application of this publication.
9) Attention is drawn to the possibility that some of the elements of this IEC Publication may be the subject of
patent rights. IEC shall not be held responsible for identifying any or all such patent rights.
International Standard IEC 62386-105 has been prepared by IEC technical committee 34:
Lamps and related equipment.
The text of this International Standard is based on the following documents:
FDIS Report on voting
34/675/FDIS 34/688/RVD
Full information on the voting for the approval of this International Standard can be found in
the report on voting indicated in the above table.
This document has been drafted in accordance with the ISO/IEC Directives, Part 2.

This Part 105 of IEC 62386 is intended to be used in conjunction with:
• Part 101, which contains general requirements for system components;
• Part 102, which contains general requirements for the relevant product type (control gear),
and with the appropriate Parts 2xx (particular requirements for control gear);
• Part 103, which contains general requirements for the relevant product type (control
devices), and the appropriate Parts 3xx (particular requirements for control devices).
A list of all parts in the IEC 62386 series, published under the general title Digital addressable
lighting interface, can be found on the IEC website.
The committee has decided that the contents of this document will remain unchanged until the
stability date indicated on the IEC website under "http://webstore.iec.ch" in the data related to
the specific document. At this date, the document will be
• reconfirmed,
• withdrawn,
• replaced by a revised edition, or
• amended.
IMPORTANT – The 'colour inside' logo on the cover page of this publication indicates
that it contains colours which are considered to be useful for the correct
understanding of its contents. Users should therefore print this document using a
colour printer.
– 6 – IEC 62386-105:2020 © IEC 2020
INTRODUCTION
IEC 62386 contains several parts, referred to as series. The IEC 62386 series specifies a bus
system for control by digital signals of electronic lighting equipment. The IEC 62386-1xx
series includes the basic specifications. Part 101 contains general requirements for system
components, Part 102 extends this information with general requirements for control gear and
Part 103 extends it further with general requirements for control devices.
The IEC 62386-2xx series extends the general requirements for control gear with lamp
specific extensions (mainly for backward compatibility with Edition 1 of IEC 62386) and with
control gear specific features.
The IEC 62386-3xx series extends the general requirements for control devices with input
device specific extensions describing the instance types as well as some common features
that can be combined with multiple instance types.
This first edition of IEC 62386-105 is intended to be used in conjunction with IEC 62386-101,
IEC 62386-102 and the various parts that make up the IEC 62386-2xx series for control gear,
together with IEC 62386-103 and the various parts that make up the IEC 62386-3xx series of
particular requirements for control devices. The division into separately published parts
provides for ease of future amendments and revisions. Additional requirements will be added
as and when a need for them is recognized.
The setup of the standards is graphically represented in Figure 1 below.

Figure 1 – IEC 62386 graphical overview
When this part of IEC 62386 refers to any of the clauses of the IEC 62386-1xx series, the
extent to which such a clause is applicable and the order in which the tests are to be
performed are specified. The other parts also include additional requirements, as necessary.
All numbers used in this document are decimal numbers unless otherwise noted. Hexadecimal
numbers are given in the format 0xVV, where VV is the value. Binary numbers are given in
the format XXXXXXXXb or in the format XXXX XXXX, where X is 0 or 1, "x" in binary numbers
means "don't care".
The following typographic expressions are used:
Variables: variableName or variableName[3:0], giving only bits 3 to 0 of variableName
Range of values: [lowest, highest]
Command: “COMMAND NAME”
DIGITAL ADDRESSABLE LIGHTING INTERFACE –

Part 105: Particular requirements for control gear and control devices –
Firmware transfer
1 Scope
This part of IEC 62386 applies to control gear and control devices.
Typically, a bus unit according to IEC 62386 (all parts) contains firmware. There are
circumstances where it might be necessary to change the firmware after production or
shipping of the product. For example if the bus unit does not operate as intended. In such a
case, a firmware update of a bus unit via the interface is beneficial.
This firmware update process is primarily designed to be a bug fix process, not a feature
extension process. Nevertheless the firmware update process can be used for feature
extensions. But it is important that the risk of negative effects to the complete system is
considered in detail.
NOTE Annex D provides a “Firmware update management check sheet” to support risk estimation.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their
content constitutes requirements of this document. For dated references, only the edition
cited applies. For undated references, the latest edition of the referenced document (including
any amendments) applies.
IEC 62386-101:2014, Digital addressable lighting interface – Part 101: General requirements
– System components
IEC 62386-101:2014/AMD1:2018
IEC 62386-102:2014, Digital addressable lighting interface – Part 102: General requirements
– Control gear
IEC 62386-102:2014/AMD1:2018
IEC 62386-103:2014, Digital addressable lighting interface – Part 103: General requirements
– Control devices
IEC 62386-103:2014/AMD1:2018
3 Terms and definitions
For the purposes of this document, the terms and definitions given in IEC 62386-101,
IEC 62386-102 and IEC 62386-103 and the following apply.
ISO and IEC maintain terminological databases for use in standardization at the following
addresses:
• IEC Electropedia: available at http://www.electropedia.org/
• ISO Online browsing platform: available at http://www.iso.org/obp

– 8 – IEC 62386-105:2020 © IEC 2020
3.1
firmware
FW
software programmed into a control gear or control device, which can be changed during an
update
Note 1 to entry: This note applies to the French language only.
3.2
CRC
cyclic redundancy check
checksum used to prevent data corruption
Note 1 to entry: Annex B provides detailed information about CRC calculation.
4 General
4.1 General
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018 apply, with
the restrictions, changes and additions identified below.
NOTE Systems with a single-master application controller are unlikely to operate correctly when other master
control devices, such as upgrade tools, are connected.
4.2 Transmitters and receivers in bus units
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018, 4.6.1 shall
be extended as follows.
Bus units supporting firmware transfer shall be additionally capable of receiving 32 bit forward
frames as specified in IEC 62386-101:2014, 7.4.3 (Reserved forward frame).
4.3 Logical units in a bus unit
If the firmware update process is started on a bus unit, all logical units inside the bus unit
shall be affected. All variables defined in Table 5 shall be shared by all logical units of the bus
unit.
5 Electrical specification
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018, Clause 5
apply.
6 Interface power supply
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018, Clause 6
apply.
7 Transmission protocol structure
7.1 General
The requirements of IEC 62386-101:2014, Clause 7 apply, with the following additions.

7.2 32 bit forward frame encoding
The forward frame format used for firmware update consists of n = 32 data bits as described
in IEC 62386-101:2014, 7.4.3 (Reserved forward frame).
The 32 bit forward frame for 32 bit frames shall be encoded as shown in Table 1.
Table 1 – 32-bit command frame encoding
Bytes/Bits
Opcode byte
Device addressing
Address byte
method
1 2 3
a
31 30 29 28 27 26 25 24 23…16 15…8 7…0
0 64 short addresses x Short addressing
1 1 1 1 1 1 0 x Broadcast unaddressed
1 1 1 1 1 1 1 x Broadcast
All other address byte values.  Reserved
a
For bit 24, 0 indicates address space for control gear, 1 indicates address space for control
devices.
8 Timing
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018, Clause 8
apply.
9 Method of operation
9.1 General
The requirements of IEC 62386-101:2014 and IEC 62386-101:2014/AMD1:2018, 9.8 (Dealing
with frames and commands), 9.2 (Transactions) with the exception that the total duration may
exceed 400 ms, 9.4 (Command iteration) and 9.6 (Use of multiple bus power supplies) apply.
9.2 Data transmission
A bus unit receives a new FW block by block. The first block (block 0) contains information
about the type of bus unit (see Table 3), which receives a new FW. This avoids transferring
the wrong FW to a bus unit if more than one bus unit is updated at a time.
NOTE Annex A provides detailed information about the update file.
The opcode byte 1 shall be 0xFB for 32-bit standard commands (see Table 6). If the opcode
byte 1 in a standard command is not equal to 0xFB, the bus unit shall not accept the standard
command.
9.3 Duration
A data transmission frame consists of a start bit, 32 data bits and a stop condition, which
occupies the bus for around 30 ms. With a settling time of less than 15 ms (maximum frame
priority) the transmission of three bytes takes less than 45 ms. For an update of 64 kByte it is
expected to take less than 20 min.

– 10 – IEC 62386-105:2020 © IEC 2020
9.4 Security
It is recommended that the individual manufacturer ensures firmware image integrity and
authenticity. This document specifies the use of CRC checksums to help ensure error-free
transfer of data.
9.5 Firmware update features
Each bus unit shall expose its firmware update features as a combination of device properties
as given in Table 2.
Table 2 – Firmware update features
Bit Description Value See
0 “fwUpdateCancelSupported” is TRUE? "1" = "YES" XXX
1-7 Reserved – not implemented "0" = "NO"

The bus unit firmware update features can be queried using
QUERY FW UPDATE FEATURES.
If the bus unit supports cancellation of the firmware update process (see 9.6.2.3),
“fwUpdateCancelSupported” is set to TRUE.
9.6 Update process
9.6.1 Start firmware update
A bus unit shall enable the firmware update process by the acceptance of the command
START FW TRANSFER. Several bus units can be addressed in this way to update more than
one bus unit at a time.
NOTE 1 Annex C provides an example of the firmware update process.
It is recommended not to trigger erasing of the memory before block 0 is verified.
Whilst “fwUpdateProcessEnabled” is TRUE, the operation of the bus unit is manufacturer-
specific except for the requirements given in this document.
NOTE 2 This includes, for example, the reaction to commands of other parts of the IEC 62386 series.
9.6.2 Data transfer
9.6.2.1 Block 0 (information block)
Block 0 contains all data for the bus unit to decide if it will accept the new firmware or not.
The GTIN number, the hardware version number and the firmware version number contained
in the bus unit are described in IEC 62386-102:2014 and IEC 62386-102:2014/AMD1:2018,
9.10.6 (Memory bank 0 for control gear) and IEC 62386-103:2014 and IEC 62386-
103:2014/AMD1:2018, 9.10.6 (Memory bank 0 for control devices). A bus unit shall have a
maximum of one family GTIN which shall be shown in the documentation of the bus unit.
Upon reception of a complete block 0, the following information is checked, where Table 3
shows block 0 content:
• The received block 0 “Size of block” is equal to the value shown in Table 3.
• The received block 0 “Block 0 version” is equal to the value shown in Table 3.

• The received block 0 “GTIN” matches the GTIN stored in memory bank 0.
• (Received block 0 “FW version min”) ≤ (memory bank 0, Firmware version) ≤ (received
block 0 “FW version max”).
• (Received block 0 “HW version min”) ≤ (memory bank 0, Hardware version) ≤ (received
block 0 “HW version max”).
• (Received block 0 “Identification number min”) ≤ (memory bank 0, Identification number) ≤
(received block 0 “Identification number max”).
• The received block 0 “Device key” meets manufacturer-specific requirements.
• The received block 0 “CRC” matches the calculated value based on the block 0 content
(see Annex B).
If the above check is successful, the following operation shall result:
• “sessionKey” shall be set to the received block 0 “Session key”,
• “currentBlock” shall be set to 1,
• “currentBlockByte” shall be set to 0,
• previously received block data that is unwritten, may be discarded.
Otherwise, the following operation shall result:
• “fwUpdateProcessEnabled” shall be set to FALSE and resume normal operation if possible.
Table 3 – Block 0 definitions
Address (hex) Size (bytes) Description
00 1 Size of block (fixed value of 0x3D for block 0)
01 1 Block 0 version (always 0x00)
a
02.04 3 Total block count (MSB first)
05.0A 6 GTIN (MSB first)
0B.0C 2 HW version min (MSB first)
0D.0E 2 HW version max (MSB first)
0F.10 2 FW version min (MSB first)
11.12 2 FW version max (MSB first)
13. 1A 8 Identification number min (MSB first)
1B.22 8 Identification number max (MSB first)
b
23.2A 8 Session key
c
2B.3A 16 Device key
3B.3C 2 CRC (MSB first)
a
This is the amount of blocks being transferred during the firmware update.
b
The session key is generated by the bus unit, which transfers the firmware update.
c
The device key and its use is manufacturer-specific. It allows the manufacturer to
specify different areas/options in his firmware.

It is recommended to calculate the CRC checksums with the incoming bytes to minimize delay
at the end of the block reception.
9.6.2.2 Block 1.n (data block)
A bus unit shall only accept a block, if the following condition is true:
• “fwUpdateProcessEnabled” is TRUE, and

– 12 – IEC 62386-105:2020 © IEC 2020
• The session key matches the received block 0 “Session key”.
After reception of a whole block, the consistency of the firmware data inside the block shall be
verified by CRC (address 0D.0E). The data consistency of the whole block shall be verified
by a second CRC (address s+0F…s+10). If the verification fails, the bus unit shall discard the
block. If a block is valid, but is the same as the last programmed block, it is recommended to
discard the block to prevent unnecessary write cycles.
Table 4 – Block 1.n definitions
Address (hex) Size (bytes) Description
00.01 2 s = Size of block data bytes (MSB first)
02.09 8 Session key
0A.0C 3 Block number (MSB first)
0D.0E 2 CRC (of block data bytes)
0F.(s+0E) s Firmware data (optionally encrypted by
manufacturer)
s+0F.s+10 2 CRC (of total block)
NOTE This allows a theoretical maximum of 65 535 bytes of firmware data per block,
resulting in a maximum total of 65 552 bytes in the block.

It is recommended to calculate the CRC checksums with the incoming bytes to minimize delay
at the end of the block reception.
9.6.2.3 Cancel firmware update
If a bus unit physically supports cancellation of FW updates and can return to the previous
FW, the bus unit shall respond to QUERY FW UPDATE FEATURES with 00000001b.
If a bus unit supports cancellation of the FW updates, the bus unit shall set
"fwUpdateProcessEnabled" to FALSE by the acceptance of the command CANCEL FW
UPDATE.
If a bus unit physically does not support a cancellation of the FW update process, it shall
ignore this command.
9.6.3 Persistent variables during firmware update
A firmware update may totally change the internal structure of the corresponding bus unit.
The values for
• the GTIN,
• the identification number,
• the hardware version,
shall not be affected by a firmware update.
If a bus unit operates in the standard mode described as operating mode 0x00 in
IEC 62386‑102:2014 and IEC 62386-102:2014/AMD1:2018, 9.10 for control gear and in
IEC 62386-103:2014 and IEC 62386-103:2014/AMD1:2018, 9.10.5 for control devices, each
NVM variable shall either remain unchanged or be set to factory default as a result of a
firmware update. The short addresses of all logical units shall be maintained at least until the
firmware update successfully completes. For a bus unit in an operating mode different from
0x00, the variables do not need to be in factory default state.

The manufacturer shall provide a document stipulating which variables are affected by the
update and if a re-commissioning of the system is necessary after the firmware update
process.
After a firmware update, an updated bus unit should first proceed to a power up sequence to
(re-)load RAM variables.
It is recommended that all NVM variables remain unchanged as a result of the firmware
update.
NOTE Due to the fact that the programme memory of a bus unit is updated, values in other parts of the IEC 62386
series marked as ROM can be changed.
9.6.4 Firmware version number
It is allowed to transfer the same firmware to a bus unit multiple times using this procedure.
It is strongly recommended that two firmware update files containing different firmware do not
contain the same GTIN number and the same firmware version number.
9.6.5 Firmware update in a system
If “fwUpdateProcessEnabled” is TRUE, it is permitted that the bus unit discards some or all
commands not described in this document (see 11.3.1).
It is recommended to run the firmware update under human observation to be able to react to
occurring errors.
It is recommended to avoid communication on the bus while a firmware update process is
running.
NOTE The device executing the firmware update can use the quiescent mode defined in IEC 62386-103:2014 and
IEC 62386-103:2014/AMD1:2018, 9.10.4, to suppress forward frames from other bus units.
9.6.6 Error recovery
If a bus unit is prevented from completing the firmware update by a temporary event such as
power failure or communications interruption, it shall be possible to re-establish and complete
the firmware update process over the bus.
EXAMPLE An example implementation would be a "bootloader". The bootloader is a smaller partitioned piece of
firmware that is capable of communicating over the bus and implementing the download and programming of a new
firmware. If the bootloader does not complete the firmware update it will retain control until the process is re-
established and completed. A common method is to start again from the beginning.
NOTE If a firmware update process is started, some or all other commands can be stopped from execution.
10 Declaration of variables
Additional variables are given in Table 5.

– 14 – IEC 62386-105:2020 © IEC 2020
Table 5 – Declaration of additional variables
Variable Default value Reset Power on Range of Memory type
(factory) value value validity
a
“fwUpdateProcessEnabled” FALSE no change FALSE [TRUE, FALSE] RAM
“currentBlock” 0 no change 0 [0, 0xFFFFFF] RAM
“currentBlockByte” 0 no change 0 [0, 0xFFFF] RAM
“sessionKey” 0 no change 0 [0, 0xFF FF FF RAM
FF FF FF FF FF]
“fwUpdateRestartEnabled” FALSE no change FALSE [TRUE, FALSE] RAM
b b
“fwUpdateCancelSupported” no change [TRUE, FALSE] ROM
a
If a previous update process failed, this value can still be set to TRUE after a power cycle.
b
(Default) value of this bit shall be defined by the manufacturer.

11 Definition of commands
11.1 General
Unused opcodes are reserved for future needs.
11.2 Overview sheets
Table 6 gives an overview of the standard commands for bus units having implemented this
document.
IEC FDIS 62386-105 © IEC 2020 – 15 –

Table 6 – Standard commands for bus units with firmware update capability
Command name Address Opcode References Command
byte byte reference
See
7.2
1 2 3
a
START FW TRANSFER Device 0xFB 0x00 0x00   9.6.1 11.3.2.1
a
 
RESTART FW Device 0xFB 0x01 0x00 11.3.2.8
a
ENABLE RESTART Device 0xFB 0x02 0x00  11.3.2.7
FINISH FW UPDATE 0xBF 0xFB 0x03 0x00   11.3.2.2
CANCEL FW UPDATE 0xBF 0xFB 0x04 0x00  9.6.2.3 11.3.2.6
a

QUERY FW UPDATE FEATURES Device 0xFB 0x05 0x00 9.5, 9.6.2.3 11.3.2.3
a
QUERY FW RESTART ENABLED Device 0xFB 0x06 0x00   11.3.2.9
QUERY FW UPDATE RUNNING 0xBF 0xFB 0x07 0x00   11.3.2.4

QUERY BLOCK FAULT 0xBF 0xFB 0x08 0x00  11.3.2.5
a
Device means Short addressing, Broadcast or Broadcast unaddressed from Table 1

Table 7 gives an overview of the data transfer commands for bus units having implemented this document.
Table 7 – Data transfer commands for bus units with firmware update capability
Command name Address Opcode References Command
byte byte reference
1 2 3
BEGIN BLOCK (data h, data m, data l) 0xCB data h data m data l  11.3.3.1
TRANSFER BLOCK DATA (data h, data m, data l) 0xBD data h data m data l  11.3.3.2

Answer
Answer
Send twice
Send
twice
– 16 – IEC 62386-105:2020 © IEC 2020
11.3 Commands
11.3.1 General
The following five commands shall be discarded while “fwUpdateProcessEnabled“ is TRUE:
• START FW TRANSFER
• ENABLE RESTART
• QUERY FW RESTART ENABLED
• RESTART FW
• QUERY FW UPDATE FEATURES
All other commands in 11.3 shall be discarded if “fwUpdateProcessEnabled“ is FALSE.
11.3.2 Standard commands
11.3.2.1 START FW TRANSFER
The bus unit shall set “fwUpdateProcessEnabled“ to TRUE and respond with “YES”.
The bus unit is ready to receive the new firmware after a waiting time of 500 ms.
11.3.2.2 FINISH FW UPDATE
If the following condition is true:
• all data blocks (see Table 4) for the firmware update have been successfully received, and
• a manufacturer specific condition for completing the firmware update is TRUE.
then “fwUpdateProcessEnabled“ shall be set to FALSE and “fwUpdateRestartEnabled” shall be set
to TRUE, the reply shall be “NO” and the bus unit may optionally continue the operation
described for RESTART FW (11.3.2.8) except for the reply specified for that command.
NOTE An example of a case when FINISH FW UPDATE will also cause the device to re-start, is for devices that
only have space for a single firmware image that is destroyed when the block data transfer starts. In such cases,
the device is executing a bootloader until the firmware update finishes and the device is restarted.
Blocks do not need to be received consecutively. Gaps are permitted between blocks. Use of
total block count from block 0 is manufacturer-specific.
If the above condition is FALSE, then the answer shall be “YES” and
“fwUpdateProcessEnabled“ shall be kept TRUE.
11.3.2.3 QUERY FW UPDATE FEATURES
The bus unit shall answer with the firmware update feature set, which is formed by a
combination of bus unit features.
Refer to 9.5 for further information.
11.3.2.4 QUERY FW UPDATE RUNNING
The bus unit shall respond with “YES”, if the variable “fwUpdateProcessEnabled“ is TRUE.
11.3.2.5 QUERY BLOCK FAULT
The bus unit shall respond with “NO”, if the following condition is true:

• “currentBlockByte” matches the block size in address 0 of this block, and
• both CRC checksums of the block addressed by “currentBlock” match the corresponding
CRC checksums of this block.
If the above condition is FALSE, then the answer shall be “YES”.
11.3.2.6 CANCEL FW UPDATE
If the bus unit supports cancellation of the firmware update, the bus unit executing the
command CANCEL FW UPDATE shall set the variable “fwUpdateProcessEnabled“ to FALSE
and discard all transferred blocks. Then the bus unit shall run through a power up sequence,
executing the previous firmware.
11.3.2.7 ENABLE RESTART
The bus unit shall set “fwUpdateRestartEnabled“ to TRUE.
11.3.2.8 RESTART FW
The bus unit shall restart firmware execution.
If “fwUpdateRestartEnabled” is FALSE, this command shall be discarded.
After execution of the command RESTART FW, “fwUpdateRestartEnabled” shall be set to
FALSE.
NOTE 1 Depending on the state of the firmware image, this could mean that the device restarts the same
firmware previously executed, or a different firmware than was previously executed, or a firmware image that can
implement only the commands described in this document (bootloader).
If the firmware that will be executed by this command does not meet the requirements
specified in IEC 62386-102 or IEC 62386-103, then the reply shall be “YES”, otherwise the
reply shall be “NO”.
NOTE 2 An example where a “YES” reply is sent is when a “bootloader” image is restarted. This could occur if the
device does not contain an alternative valid firmware image.
The bus unit shall be ready to receive frames latest 30 s after the execution of this command.
11.3.2.9 QUERY FW RESTART ENABLED
The bus unit shall respond with “YES”, if the variable “fwUpdateRestartEnabled“ is TRUE.
11.3.3 Data transfer commands
11.3.3.1 BEGIN BLOCK (data h, data m, data l)
The bus unit shall set “currentBlockByte” to 0.
The bus unit shall set “currentBlock” to the value transferred by the command itself. “data h”,
“data m” and “data l” are used to set the MSB, the middle byte and the LSB of “currentBlock”
respectively.
NOTE This allows to address 2^24 blocks in total.
The programming of a block shall not take more than 300 ms.

– 18 – IEC 62386-105:2020 © IEC 2020
11.3.3.2 TRANSFER BLOCK DATA (data h, data m, data l)
If the bus unit receives this command, 3 bytes of data are added to the current block. The bus
unit shall increment “currentBlockByte” after byte is added to the current block. If
“currentBlockByte” is the same or bigger than the current block data size, the data shall be
discarded.
The byte “data h” in-command transferred byte shall be the first byte added to the block, the
byte “data m” in-command transferred byte shall be the second byte and the byte “data l” in-
command transferred byte shall be the third byte.

Annex A
(normative)
Update file description
Beside update data, the manufacturer shall provide release notes in human readable form. It
shall contain:
• date of release in ISO 8601 format: yyyy-mm-dd;
• affected devices;
• change log;
• description of the update;
inside the update file.
The human readable part of the file shall be separated from the block data by a line
containing only 20 hyphen characters (‘-‘decimal code 45) and an end of line character ‘\n’.
Each block is then a line in the file starting with the block number (hexadecimal coded, 6 hex-
characters) followed by a space character followed by the block data (hexadecimal coded, 2
characters per byte). Each line shall end with ‘\n’.
EXAMPLE
(only one block, CRC not valid)
1970-01-01 Release 1.2\n
All LED drivers from version 1.0 up to version 1.1 from demo-company\n
Problem xx Fixed\n
--------------------\n
000000000000 3D000001000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000002222\n

– 20 – IEC 62386-105:2020 © IEC 2020
Annex B
(normative)
CRC16 Calculation
This document specifies the use of CRC checksums to help ensure error-free transfer of data.
The parameters of the CRC calculation shall be implemented according to this annex.
Detailed parameters are:
• polynomial is P(x) = x16 + x15 + x2 + 1 (0x8005 in big-endian hex representation);
• initial CRC value is 0xFFFF;
• final XOR value is zero;
• input is reflected;
• result is reflected.
"Input reflected" means, that each input byte is reflected befo
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...