STEVAL-ILL004V1 STMicroelectronics, STEVAL-ILL004V1 Datasheet - Page 27

no-image

STEVAL-ILL004V1

Manufacturer Part Number
STEVAL-ILL004V1
Description
EVAL BOARD PHASE CONTROL DIMMER
Manufacturer
STMicroelectronics
Type
Power Management: Lighting and Ballast Controllerr
Datasheets

Specifications of STEVAL-ILL004V1

Design Resources
STEVAL-ILL004V1 Gerber Files STEVAL-ILL004V1 Bill of Material STEVAL-ILL004V1 Schematic
Contents
Fully Assembled Evaluation Board
Product
Display Modules
For Use With/related Products
ST7FLITE09
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
497-5081
AN2263
6.1
6.2
Main.c module
After the MCU is turned ON, all of the peripherals in use (e.g., Ports, LITE Timer, and 12-bit
Auto-reload and ADC) are set up in “Main” program in this module. After this, all of the
variables are set up and the MCU will go into the Wait For Interrupt (WFI) mode. This leads
to minimum power consumption because the program is executed only in interrupts (from
ZC and the OC timer, see
Figure 23. Main programming flowchart
Ports.c module
All timers are switched off until the first ZC event occurs. This interrupt is handled in the
ports.c module by the PORTS_0_Interrupt routine (see
pin 0 (PA0) on the falling edge. This pin is set up as the input interrupt that is in pull-up
configuration. After catching the first interrupt, the AT timer is switched ON and the DRC is
loaded with the 0.2 ms value for the compare interrupt.
The timer is then synchronized with the ZC event. The ZC window is set up either for 50 Hz
or 60 Hz mains supplies to filter out all spikes. From this point, the AR_TIMER_OC_Interrupt
routine is performed every 0.2 ms (see
After the 50 / 60 Hz mains has been ON for a certain period of time (about 20 ms to
16.7 ms), the second ZC interrupt occurs. At this point, the interval between two ZC events
is measured and, based on this value, the corresponding flags are set (50 or 60 Hz). If this
event does not fit either the 50 or 60 Hz parameters, all of the timer flags and the counter are
reinitialized for another synchronization attempt. ZC event is expected at each 20 ms and
filtered out in time frame of +/– 1.2 ms in order to ignore all other spikes. At the end of this
Figure
23).
Set all variables
Timer settings
WDG settings
Ports settings
ADC settings
Figure
Main
WFI
End
25).
Figure
24) which checks the Port A
Ai12509
Software
27/38

Related parts for STEVAL-ILL004V1