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...

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...


Arrow and Analog Devices strategic partnership and collaborative approach to provide solutions for our customers.

Mike Britchfield (VP for EMEA Sales) talks about why Analog Devices have a collaborative approach with Arrow Arrow’s design resources are key, from regional FAEs in the field to online des...

WE MAKE IT YOURS! Garz & Fricke to present the latest HMIs and SBCs at Electronica 2018

Sascha Ulrich, Head of Sales at Garz & Fricke, gives you a quick overview about the latest SBC, HMI and Panel-PC Highlights at electronica 2018. Learn more about the SANTOKA 15.6 Outdoor HMI, the ...

Macronix Innovations at electronica 2018

Macronix exhibited at electronica 2018 to showcase its latest innovations: 3D NAND, ArmorFlash secure memory, Ultra Low Vcc memory, and the NVM solutions with supreme quality mainly focusing on Automo...

ams CEO talks about their sensor solutions that define the mega trends of the future

In this video Alexander Everke, ams’ CEO, talks to Alix Paultre of EETimes about their optical, imaging and audio sensor solutions in fast-growing markets – from smartphones, mobile device...

Intel accelerated IoT Solutions by Arrow

Arrow is showing Intel’s Market Ready Solutions in a Retailer shop with complete eco environment. From sensors via gateways into the cloud, combined with data analytics, the full range of Intel ...

CSTAR - Manufacturers of cable assembly from Taiwan

CSTAR was founded in 2010 in Taipei, Taiwan. Through years of experience, we are experts in automotive products, LCD displays, LCD TVs, POS, computers, projectors, laptops, digital cameras, medical ca...

NXP Announces LPC5500 MCU Series

Check this video to discover the new NXP microcontroller LPC5500, the target application and focus area. Links to more information: LPC5500 Series: World’s First Arm® Cortex® -M...

Molex Meets Solutions at Electronica

These are exciting times in the electronics world as Molex migrates from a pure connectors company to an innovate solutions provider. Solutions often start at the component level, such as the connecto...

Alix Paultre investigates Bulgin's new optical fiber rugged connector range at Electronica 2018

Alix Paultre interviews Bulgin's Engineering Team Leader Christian Taylor to find out more about the company's new range of optical fiber connectors for harsh environments. As the smallest rug...

Cypress MCU and Connectivity are the best choice for real-world IoT solutions.

Cypress’ VP of Applications, Alan Hawse, explains why people should use Cypress for their IoT connectivity and MCU needs. Cypress wireless connectivity and MCU solutions work robustly and sea...

Chant Sincere unveils their latest High Speed/High Frequency connection solutions at Electronica 2018

Chant Sincere has been creating various of product families to provide comprehensive connection solutions to customers. USB Series Fakra Series QSFP Series Metric Connector Series Fibro ...

Addressing the energy challenge of IoT to unleash billions of devices

ON Semiconductor introduces various IoT use cases targeted towards smart homes/buildings, smart cities, industrial automation and medical applications on node-to-cloud platforms featuring ultra-low po...

ITECH, world leading manufacturer of power test instruments, shinned on electronica 2018

ITECH, as the leading power electronic instruments manufacturer, attended this show and brought abundant test solutions, such as automotive electronics, battery test, solar array simulator, and electr...

ITECH new series give users a fantastic user experience

ITECH latest series products have a first look at the electronics 2018, such as IT6000B regenerative power system, IT6000C bi-directional programmable DC power supply, IT6000D high power programmable ...

SOTB™ Process Technology - Energy Harvesting in Embedded Systems is Now a Reality

Exclusive SOTB technology from Renesas breaks the previous trade-off between achieving either low active current or low standby current consumption – previously you could only choose one. With S...

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