DALI stack

FAQ


+ How high is the memory requirement RAM, flash, persistent memory?

Memory requirements overview

We currently require approx. 526 bytes of persistent memory

 

+ Is there a table for the memory requirements per microcontroller?

s. Table under: How much memory is required RAM, flash, persistent memory.
The memory requirement should be similar for all types of microcontrollers. It depends, among other things, on the compiler used and the associated libraries.

 

+ The size of the DALI 2 release library, which must be linked to the application, may differ slightly for different microprocessors.

On embedded systems you generally only have static libraries

 

+ How much memory does a simple Control Gear DT 6 (LED module) need?

s. Table under: How much memory is required RAM, flash, persistent memory

 

+ Is it possible to split the DALI stack into two controllers so that the lower-level drivers are executed on a "low-cost controller"?

We do not support this. The low-level driver is responsible for the timing within the API, this timing is critical, an additional communication between two processors would be a resistance in the important timing.

 

+ Is it possible to operate two instances of the DALI stack in one Cortex controller?

Yes, if they are different types -> e.g. a Device and a Gear.

 

+ What does the interface to the lower-level drivers look like?

Access is realized via callbacks with a data buffer containing the data and timestamps. API-LL is executed directly here, i.e. changes are triggered immediately in the background. Received frames are temporarily stored in a queue, which must be processed by the foreground program. must be processed by the foreground program.

 

+ Which HW resources and interrupt resources are required? (e.g. timer, ....)

  • s. Table under: How much memory is required RAM, flash, persistent memory
  • Two GPIOs are required. One as input (DALI_RX) and one as output (DALI_TX). The DALI_RX pin must be interrupt-capable.
  • A timer with a resolution of 1µS (micro-second) and the corresponding timer interrupt.
  • The interrupts of the LowLevelDriver must have the same and highest priority in the system
 

+ How long is the interrupt dwell time or how long are interrupts blocked?

The following values apply to a Cortex M4 MCU with 168 Mhz clock. This can be transferred linearly to other clock frequencies.

a) Timer interrupt:
2.7µs every 10000µs in idle state.
4.1µs per bit when sending with a subsequent idle time of 430µs or 840µs.

b) Level change interrupt:
Typically: 2.2µs per level change. Rarely 3.3µs at maximum.

When receiving, only the time b) is required.
When sending, the sum of a) + b).

 

+ Does the DALI stack have specific timing requirements for the system?

The user program must call the "dalill_processQueues()" function at least every 5ms. The call must not be blocked (e.g. by saving persistent data).

 

+ What effort is required to port the library files? ANSI, C++?

The DALI stack is programmed in ANSI-C + GNU Extensions. The DALI stack can be used for C++-programmed applications by setting the "__cplusplus" define.

 

+ How is the operation for multitasking environments such as RTOS?

The API works under RTOS. There, the "DaliProcessQueues" is outsourced in a separate thread - to activate this thread for incoming data from the bus, there is the CallBack "SignalToThread" which the LowLevelDriver calls after receiving data. All actions for the API must be called from this thread, as the API is not multithreaded. The interrupts of the LowLevelDriver must have the same and highest priority in an RTOS.

 

+ The manual mentions that several DALI devices can be instantiated in one firmware. Are identical device types (specifically two or more DT 6 LED modules) also possible?

It is possible to instantiate a control gear and a control device or an input device on one system. However, similar device types are not possible in parallel operation. An extension would be conceivable in principle so that two DT6/8 control gears can also be instantiated.

 

+ 32MHz clock frequency is stated in the minimum requirements. What percentage of the computing power of a microcontroller is used by the DALI stack?

Dies kann nicht eindeutig beantwortet werden. Unter Last (z.B. Dimm-Prozess) ca. 15% und im Ruhezustand <1%. data-preserve-html-node="true" Bei höheren Taktfrequenzen entsprechend weniger.

 

+ The DALI 2 library requires the support of a non-volatile memory of 526 bytes. What is stored in the non-volatile memory? When is storage performed (normal operation, power failure, etc.)? Is there an API to support non-volatile access?

The DALI standard specifies its own variables and the associated storage in persistent or volatile memory, e.g. it is defined that the "shortAddress" is stored in an NVM (non-volatile memory). This means that working variables such as the content of DTR0 (Data Transfer Register 0) are no longer retained after a system restart.

Persistent variables are written in a definable time interval and persistent memory is limited to a certain number of read/write accesses. In order to preserve the lifetime of the memory, persistent data can also be configured to be saved in the event of a brown-out or when the system is shut down.

We do not provide an API, the DALI stack only provides callbacks which are used to prompt the customer application to save the persistent data.

 

+ How are the libraries or software delivered? Library? (If yes, which compilers are supported?)? Is documentation available for porting?

  • There are two models for the software delivery of the DALI stack.
    i. Source files, where the customer can modify/customize the source files
    ii. As a static library, where the customer receives the header file "libdali.h" and the already compiled object files of the stack in the library file "liblibdali.a"
  • The tool chain must be provided if it is not already available at MBS.
  • The libraries are already compiled without errors and warnings (with GCC, IAR compiler and Keil compiler with activated GNU extension).
  • As a rule, no porting is required for the high level of the DALI stack, as this is hardware-independent. The only porting that needs to be carried out are the hardware-related routines in dali_ll_hal.c, which must be made available to the low-level driver as callbacks.
 

+ DALI Multi-Master: How do you design a Multi-Master system? Is this part of the DALI standard?

A system can be configured as a control device multi-master with the corresponding parameters. As soon as a multi-master or as soon as an input device (also a multi-master in principle) is on the bus, there must not be a single master - this is part of the DALI standard.