Building a safe and secure embedded world

DALI 2.0 software stack for Infineon XMC1000 microcontrollers

This article introduces a DALI 2.0 Software Stack for XMC1000 microcontrollers. This stack was developed by Infineon in close cooperation with Xenerqi and accelerates design of LED lighting applications.

Amongst other things, the XMC1000 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 Software Stack for its XMC1000 microcontrollers. This significantly reduces development time and costs. 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.

The key features of the XMC1000 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 analogue 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 analogue 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), highspeed analogue 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. GAN).

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.

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 arc 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. DAL1 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. 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 approved for Xenerqi LED drivers and Infineon XMC LED current control explorer kit. With the approved 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 DALT 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. 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 approved 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. (Article written by Marcelo Williams Silva and Georg Huba of Infineon Technologies)

To find out more, contact Dave Greenhill on 024 7669 2066.


Search form Contact Onlineshop