Smart lighting control with DALI 2.0 software stack for XMC1000 microcontrollers

This article introduces a DALI 2.0 slave software stack for XMC 1000 microcontrollers. This stack was developed by Infineon in close cooperation with Xenerqi and accelerates design of LED lighting applications.

By Marcelo Williams Silva and Georg Huba, Infineon Technologies         Download PDF version of this article

Amongst other things, the XMC 1000 microcontroller family with ARM-Cortex-M0 offers optimised peripherals and functionalities for smart lighting control. This makes it possible to address a host of different applications both indoors and in commercial buildings. It is within this environment that DALI (Digital Addressable Lighting Interface) has established itself as a standardised interface for controlling lighting control gear. With DALI 2.0, interoperability between components from different manufacturers has been further improved, whilst the integration of sensors significantly extends the possibilities for smart lighting applications. Infineon has partnered with Xenerqi to develop a DALI 2.0 certified slave software stack for its XMC 1000 microcontrollers. This significantly reduces development time and costs.

Figure 2. Block diagram of the XMC 1000 microcontroller unit

Smart lighting solutions extend conventional LED lighting with new functionalities such as wired and wireless connectivity, programmability, sensors, improved lighting quality and intelligent colour mixing. With special peripherals and functionalities, XMC microcontrollers are predestined for numerous modern LED lighting systems. For instance, automatic dimming and colour control for multi-channel LEDs is supported. In addition to the LED control, the MCUs of the 1200, 1300 and 1400 series can also handle DALI or DMX communication. Furthermore, the XMC microcontrollers can be used to implement the power supply for the LED driver, supporting all standard two-stage switched-mode power supply topologies.

Figure 3. The BCCU (Brightness and Colour Control Unit) facilitates flicker-free dimming and colour control of LEDs with virtually no processor load.

The key features of the XMC 1000 family for smart lighting systems are: automatic brightness control (based on high-frequency pulse modulation), flicker-free dimming via 9 output channels, automatic exponential dimming and linear intensity changes for natural, eye-friendly brightness and colour changes, high-speed integrated analog comparators for current control, and closely coupled peripheral functions for various digital power conversions.

The introduction of the LED into all areas of lighting technology has led to extensive changes in the control of lights. What was once controlled in the past with phase dimmers or an analog 1…10V interface is now digitally connected. The most popular standardised interface DALI – originally designed for dimming fluorescent lamps – has established itself as the standard for lighting design, driven by the success of LED lights. With DALI 2.0, interoperability has been further enhanced, whilst the integration of sensors opens up new possibilities for smart lighting applications.

The XMC1000 family with the ARM Cortex M0 core is available in the XMC1100, XMC1200, XMC1300 and XMC1400 series with flash versions up to 200 KB and enclosures with up to 64 pins. Even the entry-level XMC1100 series, with its basic feature set, provides many industrial applications with cost-effective access to the 32-bit world with 12-bit AD converters and powerful 16-bit timers of Capture/Compare Unit 4 (CCU4). The XMC1200 series includes additional application-specific features such as a peripheral unit for capacitive touch applications and for the control of LED displays (LEDTS), high-speed analog comparators and an innovative Brightness and Colour Control Unit (BCCU). The BCCU permits flicker-free dimming and colour control of LEDs with virtually no processor load. What is more, versions are available for the extended temperature range from -40 °C up to 105 °C. Last but not least, the XMC1300 series is specifically designed for motor control and digital power conversion applications. In addition to a particularly powerful Capture/Compare Unit 8 (CCU8) with two compare channels and asymmetric PWM functionality and a position interface (POSIF) for precise detection of the motor position, it also offers a mathematical coprocessor. The latter permits efficient sensorless FOC (field-oriented control) solutions for electric motors. The XMC1300 series also offers variants for the temperature range up to 105 °C. In addition to the features of the XMC1200/1300 series, the XMC1400 derivatives offer up to four serial channels (control of 4-channel LEDs), significantly increased processing power (more than 70 percent) and enhanced connectivity (e.g. CAN).

The XMC1200, XMC1300 and XMC1400 series feature the innovative BCCU unit mentioned already. The basic function of the BCCU consists in automatically providing dimming signals at the port connections for external LED drivers. The BCCU is designed for automatically controlling the dimming and the colours of multi-channel LED lamps with minimal code input. One development goal was the flicker-free display. However, not every change in luminance is perceived by the observer as flicker. The corresponding threshold of perceptibility is frequency-dependent and has been determined empirically. These findings have gone into the design of the BCCU. A key feature is the automatic high-frequency brightness modulation (PDM with 12-bit resolution). This generates an individual bitstream for each of the nine channels in total. The high frequency produces a high resolution for the brightness value and/or the colour value in RGB applications. This permits a flicker-free display, whilst supporting a wide range of different LED drivers and/or high-performance LEDs.

The BCCU integrates three dimming engines. These facilitate the exponential change in brightness. The exponential dimming and linear change in intensity make the dimming steps and colour changes appear totally natural to the human eye. The three dimming engines can be assigned to any of the nine channels. This means it is possible, for example, to control three RGB lights or one street light with up to nine LED strings. The BCCU also provides trigger signals for the A/D converter. This in turn permits synchronised measurement of currents in multiple LED strings, for example.

The linear walker plays an important role in the colour change of RGB lamps. This adjusts the frequency of the bitstream for each channel so that, starting from colour X, the target point of colour Y in the colour space for each of the three channels (red, green, blue) is reached at the same time within a predetermined time. The colour transition is considerably more pleasant and natural to the human eye with this method. In addition, no complex software algorithms are required.

Figure 4. DALI 2.0 extends the IEC 62386 with Part 103 (control devices). New device types from the field of sensors, such as buttons, light sensors, motion sensors and remote-control interfaces, are now defined in the standard.

DALI is probably the most common interface for lighting control with regard to the light. Products for numerous applications (multi-function lights, multi-channel lights, emergency lights, etc) are available today from a wide range of manufacturers. All these devices are standardised and classified in the DALI standard IEC 62386.102. The different device types (device types 0-8) are defined in the standard parts 201 to 209. For example, device type 6 specifically describes LED control gear, and device type 1 the characteristics of DALI emergency lighting devices. Data communication, parameter sets and topology are also defined in IEC62386.

DALI 2 is designed to close gaps in the original standard and allow for better interoperability. Originally describing only control gear and general communication, DALI 2 opens the world of sensor technology to manufacturers and users. IEC 62386 has therefore been extended with Part 103 (control devices). New device types from the field of sensors, such as buttons, light sensors, motion sensors and remote control interfaces, are now defined in the standard.

In its first version, DALI works according to the pure master-slave principle, which limits extensive sensor functions. DALI 2 makes it possible to communicate control commands and operating data for light operating devices as well as sensor functions across manufacturers. With DALI 2, 64 light operating devices and 64 sensor control devices can be operated together in one line. Building automation systems can also process the sensor information and optimise it with other data, such as heating/ventilation/air conditioning. Central maintenance functions can monitor lamp status, power consumption, or switching cycles, and depict these functions visually in the form of statistics.

DALI 2 also laid the foundation for far-reaching interoperability. For the first time, a standardised operating device is not only controlled according to the master-slave principle, but also event-controlled communication between the application controller and the control device is possible. Backward compatibility with DALI 1 installations is also ensured. To ensure full compatibility, it is necessary to test against the standard.

Figure 5. DALI 2.0 software stack for the XMC1000 family

The DALI 2 standard (IEC 62386 Part 101/102 – Edition 2.0 2014-11) improves the predictability of gear control. With this in mind, Xenerqi and Infineon have developed a DALI 2 software stack for the XMC1000 family, and the software has been certified for Xenerqi LED drivers and Infineon XMC LED current control explorer kit. With the certified stack and the XMC single-chip solution for DALI 2.0 users can almost halve the development time and also save costs. The DALI 2.0 control gear stack is designed for integration into a host application that provides a solution for DALI 2.0 control gear with one or more DALI controls. The corresponding instances are defined in accordance with IEC 62386-101: 2014 (Ed2.0), Section 3.16. as devices that are connected to the bus and receive commands to drive at least one output directly or indirectly. The stack implements all DALI 2.0 protocols for gear control. This includes the following functions: processing of all DALI commands from the DALI bus, monitoring for all corresponding error conditions on the DALI bus, processing of the corresponding light output for gear control with timing and sequence fade conditions, processing of configuration changes requested by the DALI controllers via the bus interface, DALI short address assignment, including assignment of random addresses in coordination with the DALI controllers, and management of delays and other timing conditions in relation to DALI operations.

The DALI 2.0 slave stack is not a stand-alone solution. The stack and its associated library provide the core functionality and software components needed to develop a DALI 2.0 control. Application developers must therefore configure the stack and its components according to their specific control solution. The stack supports all functions as specified in the general requirements for DALI 2.0 control gear. However, the stack only implements the functionalities that apply across all control devices. Application-specific DALI functionality for control gear, especially the hardware-dependent functions, must be implemented via the host application. This also applies to optional DALI 2.0 control functions. In addition, the stack defines callback functions that it uses for the interface and management of the application-specific functions.

Figure 6. The DALI 2.0 software stack has been certified for the XMC LED current control board.

Software development for the XMC microcontrollers can be performed in two ways – either via the standard peripheral library (XMC Lib) or via DAVE apps. Although using the XMC Lib means working on a low level of abstraction, the full functionality of the peripherals can be used flexibly. However, some hardware know-how is required. In addition, compilers from third-party providers can be used. With the DAVE apps, you develop on a higher level of abstraction and use specific application examples. Consequently, no detailed hardware knowledge is necessary. The use of DAVE Version 4 is the requirement here. The free development platform includes all necessary tools like GNU compiler, debugger and data visualisation. In addition, DAVE apps are available for a variety of applications as well as LED lamp control. Infineon also offers several LED evaluation boards for the XMC1000 family. The already-mentioned XMC LED current control board features a 15W DC/DC buck controller, a DALI PHY and extensive documentation. The DALI 2.0 stack is certified for this board. DALI 2.0 design examples are in preparation. In addition, other RGB/LED kits (with DALI and DMX Phy) are available with a standard LED driver as well as an RGB / LED Arduino lighting shield.


Is the Universal Translator Finally Here?

This webinar from NXP will provide a detailed insight on why these advanced, extremely-low power translators from NXP Logic are the solution for your mixed voltage applications! Today's modern,...

Driving lower power for MCU products even lower

The MSP430 microcontroller family from Texas Instruments prides itself on extremely low power consumption. However, their flagship power consumption is contingent upon various properties like supply...

Logic Innovations for space and power savings

In  this webinar the latest Nexperia logic developments and package trends will be presented. The next generation of Smart Grid and intelligent facilities requires advanced power management so...

Slimming program for medical operating devices

Operating devices in the medical sector are not only subject to strict controls and requirements. Nowadays design demands are becoming more and more important for developers of medical HMI devices. De...

Establishing a root of trust to secure the IoT

Security is not something that any developer can ignore. It is no longer safe, for the OEM or their customers, to assume that their product or service is immune to cyber attacks. The sheer size of the...

Securing the smart and connected home

With the Internet of Things and Smart Home technologies, more and more devices are becoming connected and therefore can potentially become entry points for attackers to break into the system to steal,...

Acoustic MEMS - letting systems listen to the world

Ambient intelligence is fast becoming a mainstream technology. Many homes now have some form of smart speakers that understand spoken commands. Car dashboards and navigation systems use voice control ...

Mass Connectivity in the 5G Era

5G will achieve faster transmission rates, more powerful data exchange networks, and more seamless real-time communication, which will enable tremendous growth for advanced and innovative connectivity...


Arduino CEO Fabio Violante on their migration upwards in engineering

In this video Arduino CEO Fabio Violante talks about their ambitious migration upwards in engineering solutions and products with Alix Paultre in Tegernsee, Germany. Arduino, long known for their deve...

Silicon Lab CEO Tyson Tuttle talks about their wireless IoT portfolio

In this video Silicon Lab's Tyson Tuttle talks to Alix Paultre about their new wireless IoT portfolio. Wireless Xpress provides a configuration-based development environment, with certified Blueto...

Keysight's Joachim Peerlings talks about the new UXR series Oscilloscope

In this video Keysight's Joachim Peerlings talks about the new UXR series Oscilloscope with Alix Paultre at their launch event in Munich. The Infiniium UXR-Series of oscilloscopes has models rangi...

BrainChip explains their new Neuromorphic System-on-Chip

In this video, Bob Beachler of BrainChip talks to Alix Paultre about their latest single-chip neural network technology.  Spiking neural networks (SNNs) are inherently lower power than traditiona...


In this video the Vincotech team walks us through the most important topics displayed on their booth at PCIM Europe 2018. It also explains why Vincotech is First in SiC Modules. Being very flexible in...

Microchip talks about their latest secure microcontroller

Microchip's new SAM L10 and SAM L11 families of 32-bit microcontrollers (MCUs) address the growing need for security in Internet of Things (IoT) endpoints by protecting against the increasing the ...

E-Mail Newsletters


Our 3 E-Mail Newsletters: EETimes/EDN Europe, Embedded News and Power Electronics News inform about the latest news in technology and products, as well as technical know-how like white papers, webinars, articles, etc.

B & S / ECE Magazine

- latest issue is online now -

November 2018

Content Highlights

Cover Story

Internet-connected displays make the industrial IoT more visible

Download now