background image

May 2014

DocID026248 Rev 1

1/21

UM1753

User manual

Description of STLUX385A peripheral library

Introduction

This user manual provides complete information for SW developers on the STLUX385A 
library, a library of APIs useful to get familiar developing applications for the STLUX385A 
digital controller and its peripherals. 

The STLUX385A is an STMicroelectronics

®

 digital device tailored for lighting applications. 

The heart of the STLUX is the SMED (“State Machine Event Driven”) technology which 
allows the device to operate several independently configurable PWM clocks with up to 
1.3 ns resolution. A SMED is a powerful autonomous state machine which is programmed to 
react to both external and internal events and may evolve without any software intervention. 
The tools provided by this Kit will help you understand the SMEDs and how to program them 
in your applications.

SMEDs are configured and programmed via the STLUX internal low-power microcontroller 
(STM8). This manual describes the tools provided in this kit.

www.st.com

Содержание STLUX385A

Страница 1: ...The heart of the STLUX is the SMED State Machine Event Driven technology which allows the device to operate several independently configurable PWM clocks with up to 1 3 ns resolution A SMED is a power...

Страница 2: ...ed 10 3 4 STLUX385A analog comparator unit stlux_acu 11 3 5 STLUX385A analog to digital converter stlux_adc 11 3 6 STLUX385A system timer stlux_stmr 13 3 7 STLUX385A general purpose I O stlux_gpio 15...

Страница 3: ...ble 4 STLUX385A analog comparator unit 11 Table 5 STLUX385A analog to digital converter 11 Table 6 STLUX385A system timer 13 Table 7 STLUX385A general purpose I O 15 Table 8 STLUX385A auxiliary timer...

Страница 4: ...ion of the internal Flash memory please refer to the STM8 Flash programming manual PM0047 For information about the debug and SWIM single wire interface module refer to the STM8 SWIM communication pro...

Страница 5: ...gital to analog converter DALI Digital addressable lighting interface ECC Error Correction Code FSM Finite state machine FW Firmware loaded and running on the CPU GPIO General purpose input output HSE...

Страница 6: ...System timer SW Software is the firmware loaded and running on the CPU synonymous of FW SWI Clock switch interrupt SWIM Single wire interface module UART Universal asynchronous receiver transmitter W...

Страница 7: ...fault initialization values CLK_HSECmd NewState it can be ENABLE or DISABLE Enables disables HSE CLK_HSICmd NewState it can be ENABLE or DISABLE Enables disables HSI CLK_LSICmd NewState it can be ENAB...

Страница 8: ...ividers CLK_SWIMConfig CLK_SWIMDivider specifies the SWIM clock divider to apply It can be divided by 1 or 2 This function configures the SWIM clock frequency on the fly CLK_ClockSecuritySystemEnable...

Страница 9: ...d PLL CLK_CCODIVR is the division factor n for the CCO clock CLKCCO CLK n 1 This function sets the clock source for the CCO clock CLK_ADCConfig CLK_ADC_Source specifies the clock source for the ADC It...

Страница 10: ...ns zero in case of unsuccessful operation due to pending time validation one otherwise Sets the time value to the status TimeRegister for the selected SMEDx SMED_ValidateTimeValues SMEDx is the SMED T...

Страница 11: ...or CPx In case of CP3 also the internal external reference is specified ACU_SetCompareLevel ACUx specifies the comparator peripheral number DACIN specifies the input voltage level to be set Assigns a...

Страница 12: ...he gain factor to be applied for the conversion This function returns the 16 bit value coming from the specified channel Given a channel number and a gain factor the function returns a 16 bit value ca...

Страница 13: ...ed STMR interrupts STMR_UpdateDisableConfig Newstate can be ENABLE or DISABLE Enables or disables the update event for the auto reload preload mode STMR_UpdateRequestConfig STMR_UpdateSource specifies...

Страница 14: ...escaler The returned value is the current STMR prescaler Gets the current STMR prescaler value STMR_GetFlagStatus STMR_FLAG specifies the STMR status register value The returned value is the current f...

Страница 15: ...level to the specified GPIO pins GPIO_WriteLow GPIOx specifies the GPIO peripheral number PortPins specifies the pins to be turned low to the port output Sets low level to the specified GPIO pins GPI...

Страница 16: ...figuration ATM_OutDigIn0 NewState can be ENABLE or DISABLE Enables or disables the ATM clock to be sent to DIGIN 0 ATM_ITConfig NewState can be ENABLE or DISABLE Enables or disables the ATM to generat...

Страница 17: ...ables or disables the UART peripheral UART_ITConfig UART_IT specifies the interrupt source to be enabled NewState can be ENABLE or DISABLE Enables or disables the specific UART interrupts UART_IsITEna...

Страница 18: ...e UART node Sets the address of the UART node UART_SetPrescaler Prescaler can be a value ranging from 0 to 128 Sets the system clock UART prescaler UART_GetFlagStatus UART_FLAG specifies the UART stat...

Страница 19: ...Parity error interrupt LIN break detection interrupt Receive overrun interrupt Returns the current status for the specified interrupt Checks whether the specified UART interrupt has occurred or not UA...

Страница 20: ...Revision history UM1753 20 21 DocID026248 Rev 1 4 Revision history Table 11 Document revision history Date Revision Changes 14 May 2014 1 Initial release...

Страница 21: ...OPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN A SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PROD...

Отзывы: