Structure Of Final User Application; User Application - ST STM32F1 Series User Manual

Dali slave interface
Hide thumbs Also See for STM32F1 Series:
Table of Contents

Advertisement

Structure of final user application

2
Structure of final user application
The final user application uses the DALI slave library and so, consists of the following three
layers:
Main user application
DALI stack layer
I/O pin driver layer
2.1

User application

The structure of the user application is comprised completely of IAR project files. The
application code is in one source file, "main.c", in which the whole user ballast control is
implemented. This code calls the DALI slave library functions.
The user application example included in the DALI slave library package is designed to work
with the "STM32 discovery kit" and "STEVAL_ILM001V1 (DALI transceiver board)". The
STM32 discovery kit is a small printed circuit board (PCB) with an integrated
STM32F100RBT6 device which demonstrates STM32 capabilities. The DALI transceiver
board is connected to the STM32 discovery kit as a physical layer extension. It provides
voltage level conversion and optical isolation between the DALI bus and the STM32
discovery kit (according to the DALI specification requirements).
The main task of the user application is to initialize the DALI stack and to implement the light
intensity control function (callback function). This function is ballast dependent. The user
application also periodically controls some event flags. If the DALI slave library sets an
event flag and it indicates a pending event, the user application must call the appropriate
service routines (from the DALI slave library) to execute the necessary commands.
The user application example uses timer 3 to control the light intensity of the LED diode
present on the STM32 discovery kit. Timer 3 generates the pulse-width modulation (PWM)
for the LED diode (using the callback function). The main program loop checks event flags,
executes actions for active flags, and provides power management (Low power state if the
DALI bus is quiet) and error management (reports hardware errors). For all these purposes
the user application calls functions from the DALI slave library.
8/31
DocID025866 Rev 1
UM1728

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F1 Series and is the answer not in the manual?

Questions and answers

Table of Contents