ST STM8L1526-EVAL User manual

September 2009 Doc ID 15437 Rev 1 1/46
UM0684
User manual
STM8L1526-EVAL evaluation board
Introduction
The STM8L1526-EVAL evaluation board is a complete demonstration and development
platform for STMicroelectronic's STM8 core-based STM8L152C6 microcontroller which
supports I2C, SPI, USART, 12-bit ADC, 12-bit DAC, LCD driver, 2 KB internal SRAM, 32 KB
EEPROM and SWIM debugging.
The full range of hardware features on the board helps you evaluate all peripherals (motor
control, USART, audio DAC, LCD, IR LED, IrDA, SPI Flash, MicroSD Card, temperature
sensor and EEPROM… etc.) and develop your own applications. Extension headers
facilitate easy connection of a daughterboard or wrapping board for specific applications.
An ST-LINK is integrated on the board as the embedded in-circuit debugger and
programmer for the STM8 MCU.
Figure 1. STM8L1526-EVAL evaluation board
www.st.com

Contents STM8L1526-EVAL
2/46 Doc ID 15437 Rev 1
Contents
1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Demonstration software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Order code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Hardware layout and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Reset source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 LCD glass module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5 Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6 EEPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 RS-232 and IrDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.8 Motor control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.9 MicroSD Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.10 Analog input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.11 Serial Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.12 Temperature sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.13 Development and debug support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.14 Display and input devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.15 IDD measurement and comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.16 Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.17 IR LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1 RS-232 connector CN1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Power connector CN2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 TFT LCD connector CN3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.4 Daughterboard extension connector CN4 and CN10 . . . . . . . . . . . . . . . . 22
3.5 LCD glass connector CN5 and CN6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.6 Motor control connector CN7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

STM8L1526-EVAL Contents
Doc ID 15437 Rev 1 3/46
3.7 STice connector CN8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.8 ST-LINK programming connector CN9 . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.9 USB type B connector CN11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.10 SWIM connector CN12 and CN16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.11 Audio jack CN13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.12 MicroSD connector CN14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.13 BNC connector CN15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Appendix A STM8L1526-EVAL I/O assignment . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Features STM8L1526-EVAL
4/46 Doc ID 15437 Rev 1
1 Features
1.1 Hardware
●Three 5 V power supply options: power jack, ST-LINK USB connector or daughterboard
●Audio speaker and microphone connected to the DAC and ADC of the STM8L152C6
●1 GByte SPI interface MicroSD Card
●128 Mbit SPI serial Flash
●I2C compatible serial interface 64 KBit EEPROM and SMBusTemperature sensor
●RS-232 communication
●IrDA transceiver
●Inductor motor control connector
●SWIM debug support, ST-LINK embedded
●122x32 dot matrix LCD connected to the SPI interface of the STM8L152C6
●Joystick with 4-direction control and selector
●Reset and User button
●4 color LEDs and one bicolor LED
●MCU consumption measurement circuit
●LCD glass 28 x 4 segments (7 digits alpha numeric) connected to the LCD driver inside
the STM8L152C6
●Extension connector for daughterboard or wrapping board
●MCU voltage choice 3.3 V or adjustable from 1.65 V to 3.6 V
●STice connector footprint
●Board RoHS compliant (lead free)
1.2 Demonstration software
Demonstrationsoftware is preloaded in the board’s Flash memory for easy demonstration of
device peripherals in stand-alone mode. For more information and to download the latest
version available, please refer to STM8L1526-EVAL demonstration firmware available on
web: www.st.com/mcu.
1.3 Order code
To order the STM8L152C6 evaluation board, use the order code STM8L1526-EVAL.

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 5/46
2 Hardware layout and configuration
The STM8L1526-EVAL evaluation board is designed around the STM8L1526C6T6 (48-pin
LQFP package). The hardware block diagram Figure 2 illustrates the connection between
the STM8L152C6 and the peripherals (LCD glass, dot matrix LCD, serial Flash, EEPROM,
temperature sensor, USART, IrDA, audio, MicroSD Card, Motor control and embedded ST-
LINK). Figure 3 and Figure 4 help you locate these features on the actual evaluation board.
Figure 2. Hardware block diagram
LCD Glass module
STM8L1526
RS232
transceiver
IrDA
transceiver
3.3V regulator
Dot Matrix
LCD
MicroSD
card
Audio DAC
BNC connector
MC control
connector
LEDs
Potentiometer
USART
DB9 connector
DAC
GPIO
I2C
Extension
connector for
GPIOs
MCU
consumption
measurement
USART
Temperature
Sensor
SPI
SWIM
EEPROM
Joystick
1.65V to 3.6V
adjustable
regulator
LCD driver
Voltage
translator Serial Flash
ADC
Embedded
ST-LINK
USB TypeB
connector
Micro-Phone
Amplifier
User Key
ADC
GPIO
STM8L1526C6T6

Hardware layout and configuration STM8L1526-EVAL
6/46 Doc ID 15437 Rev 1
Figure 3. STM8L1526-EVAL layout
U16
LD6 IR LED
U2 IrDA
U7
CN1
CN2
RV1
RV2 Potentiometer
CN4, CN10 Extension header CN7 Motor control
CN13
CN8 STice
LCD
CN15 BNC
CN11 ST-LINK
CN12 & CN13
CN14
B1 reset key B2 user keyU17 joystick
VDD_Adjustment
USB connector
SWIM connecto
r
connector
connector
MicroSD Card
Audio Jack
glass module
STM8L1526
USART
Dot matrix LCD
Power Jack

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 7/46
Figure 4. STM8L1526-EVAL jumpers and solder bridges

Hardware layout and configuration STM8L1526-EVAL
8/46 Doc ID 15437 Rev 1
2.1 Power supply
The STM8L1526-EVAL is designed to be powered by a 5 V DC power supply and to be
protected by PolyZen from a wrong power plug-in event. It is possible to configure the
evaluation board to use any of following three power supply sources.
1. 5 V DC power adapter connected to CN2, the power jack on the board (power supply
unit (PSU) on silk screen).
●5 V DC power with 500 mA limitation from CN11, the USB type B connector for ST-
LINK (ST-link on silkscreen (STL)).
●5 V DC power from CN10, the extension connector for daughterboard (daughterboard
power source (DTB) on silkscreen).
The power supply is configured by setting the related jumpers JP1, JP2 and JP11 as
described in Table 1.
Table 1. Power related jumpers: JP1, JP2, JP11
Jumper Description Setting
JP2
JP2 selects one of the three possible power supply resources.
For power supply jack(CN2) to the STM8L1526-EVAL only, JP2 is set as shown
to the right.
For power supply from the daughterboard connectors(CN10) to STM8L1526-
EVAL only, JP2 is set as shown to the right.
For power supply from ST-LINK connector (CN11) to STM8L1526-EVAL only,
JP2 is set as shown to the right (default setting).
For power supply from power supply jack (CN2) to both STM8L1526-EVAL and
daughterboard connected on CN4 and CN10, JP2 is set as shown to the right
(daughterboard must not have its own power supply connected).
JP1
VDD is connected to fixed +3.3 V DC power when JP1 is set as shown to the
right (default setting).
VDD is connected to adjustable DC power from 1.65 V to 3.6 V when JP1 is set
as shown to the right.
JP11
VDD power is directly connected to MCU VDD when JP11 is set as shown to
the right.
Note: For manual IDD measurement the jumper on JP11 must be removed and
replaced by an ammeter connected between JP11 pin 2 and pin 3.
Connect VDD power to MCU with current-sampling resistor, 2 ohm or 2 Kohm,
in-series for IDD current measurement when JP11 is set as shown to the right
(default setting).
S
TLink
D
TB
P
SU
S
TLink
D
TB
P
SU
S
TLink
D
TB
P
SU
S
TLink
D
TB
P
SU
321
3
21
321
3
21

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 9/46
To enable MCU power consumption measurement, JP11, JP3 and LCD glass module
should be re-configured as described in Table 1 and Table 2.
The LED LD8 is lit when the STM8L1526-EVAL evaluation board is powered by the 5 V
correctly, the LED LD9 is lit if the MCU is powered by a low voltage (VDD < 1.8 V).
Note: The AC220V to DC5V power adapter PSU-5V2A (recommended, can be ordered from ST, it
is not provided with board by default) or equivalent (polarity compatible with CN2) can be
used to power the STM8L1525-EVAL board via the power jack CN2 on the board.
To order the recommended power supply, use the order code PSU-5V2A.
2.2 Clock source
Two clock sources are available on the STM8L1526-EVAL for the STM8L152C6 and
embedded RTC.
●X2, 32 kHz crystal for embedded RTC
●X1, 16 MHz crystal with socket for the STM8L152C6 microcontroller, it can be removed
from the socket when the internal RC clock is used.
Note: I/O ports PA2 and PA3 can be used as GPIO on extension connector by closing solder
bridges SB1 and SB2 when crystal X1 is removed from it's socket.
Table 2. MCU power consumption measurement related jumpers
Jumper Description
JP3
The microphone output is connected to ADC of the STM8L152C6 when JP3 is closed.
Default setting: Fitted
For MCU power consumption measurement, JP3 must be kept open to avoid current
injection.
For motor control application, JP3 must be kept open to avoid conflict between the
speaker and motor control connector, CN7.
LCDglass
module The LCD glass module must be mounted on the "IO" position for MCU power
consumption measurement. Refer to Section 2.4: LCD glass module for details.
Table 3. 32 kHz crystal X2 related solder bridges
Solder bridge Description
SB3
PC5 is connected to 32 kHz crystal when SB3 is set as pad1 connected to pad2
(default setting).
PC5 is connected to STice connector CN8 and extension connector CN4 when SB3
is set as pad2 connected to pad3.
SB4
PC6 is connected to 32 kHz crystal when SB4 is set as pad2 connected to pad3
(default setting).
PC6 is connected to STice connector CN8 and extension connector CN4 when SB4
is set as pad1 connected to pad2.

Hardware layout and configuration STM8L1526-EVAL
10/46 Doc ID 15437 Rev 1
2.3 Reset source
The reset signal of the STM8L1526-EVAL is low active and the reset sources include:
●Reset button B1
●Debugging tools from SWIM connector CN12 and CN16
●Daughterboard from CN10
●Embedded ST-LINK
●RS-232 connector CN1 for ISP
2.4 LCD glass module
An LCD glass module (MB821) with 8-digit liquid crystal display is mounted on the
STM8L1526-EVAL evaluation board. It can be connected to the LCD driver of the
STM8L152C6 MCU or can work as a set of jumpers by mounting it in two possible positions,
position IO or position LCD.
●Position IO. All peripherals (USART, IrDA, MicroSD Card, dot matrix LCD, serial Flash,
LEDs, joystick, bicolor LED, potentiometer, MCU consumption measurement, motor
control and microphone) shared with LCD glass are connected to the STM8L152C6
and the LCD glass is disconnected when LCD glass module is mounted on position IO
as shown below (default setting). See Figure 5.
●Position LCD. LCD glass is connected to the LCD driver of the STM8L152C6 and all
peripherals shared with the LCD glass are disconnected when the LCD glass module is
mounted on position LCD as shown below. In this position, as well as the LCD, there
are other resources available on the board:
– I2C EEPROM or Key button depending on JP7 jumper position
– Audio speaker amplifier or BNC depending on JP10 jumper position.
– IR LED depending on JP6 jumper position.
See Figure 6.
Table 4. Reset related jumpers
Jumper Description Setting
JP15 The board Reset is managed by pin 1 of connector CN1 (RS-232 DCD signal)
when JP15 is closed. This configuration is used for boot loader application only.
Default Setting: Not fitted
JP13 PA1 is connected to the Reset source listed above when JP13 is set as shown to
the right: (Default setting).
PA1 is connected to ground when JP13 is set as shown to the right. So, the MCU
is kept on Reset when you connect STice to CN8 for debugging.
3
21
3
21

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 11/46
Figure 5. LCD glass module in position I/O
Figure 6. LCD glass module in position LCD
2.5 Audio
The STM8L1526-EVAL supports:
●a speaker connected to the DAC output of the STM8L152C6 through an audio amplifier
which can be enabled or disabled by setting JP9. The choice between BNC or DAC
output on PF0 is done by JP10, refer to Table 5 for details.
●a microphone connected to the ADC input of the STM8L152C6 through a microphone
amplifier. The microphone output can be connected or disconnected to the
STM8L152C6 by setting JP3 to closed or open, refer to Table 2 for details.
The LCD glass module must be mounted on "IO" position for Microphone. Refer to
Section 2.4: LCD glass module for details.
Table 5. Audio related jumpers
Jumper Description Setting
JP9 The speaker amplifier is enabled when JP9 is closed.
Default setting: Fitted
JP10
PF0 is connected to BNC connector CN15 when JP10 is set as shown to the
right.
PF0 is connected to speaker when JP10 is set as show to the right (default
setting).
3
21
3
21

Hardware layout and configuration STM8L1526-EVAL
12/46 Doc ID 15437 Rev 1
2.6 EEPROM
A 64 KBit EEPROM is connected to the I2C bus of the STM8L152C6.
Note: The E2PROM used on the board (ref M24C64-DFW5TP) is limited in VDD range from 1.7 to
5.5 V by specification therefore its behavior is not guaranteed for VDD from 1.65 to 1.7 V.
2.7 RS-232 and IrDA
Both RS-232 and IrDA communication is supported by D-type 9-pin RS-232 connectors
CN1 and IrDA transceiver U2 which connect to the USART of the STM8L152C6 on the
STM8L1526-EVAL evaluation board.
The signal Bootloader_RESET is added on the RS-232 connector for ISP support.
RS-232 or IrDA can be selected by setting JP5.
The LCD glass module must be mounted in the IO position for RS-232 and IrDA. Refer to
Chapter 2.4: LCD glass module for details.
Note: Hardware flow control is not supported by the RS-232 interface (CTS and RTS not managed
by MCU).
Table 6. EEPROM related jumpers
Jumper Description Setting
JP14 The I2C EEPROM U29 is in write protection mode when JP14 is not fitted.
Default setting: Fitted
JP7
PC1 is connected to the User button when JP7 is set as shown to the right .
PC1 is connected to I2C_SCL when JP7 is set as shown to the right (default
setting).
3
21
3
21
Table 7. RS-232 and IrDA related jumper
Jumper Description Setting
JP5
USART_RX is connected to the RS-232 transceiver and RS-232 communication
is enabled when JP5 is set as shown to the right (default setting).
USART_RX is connected to the IrDA transceiver and IrDA communication is
enabled when JP5 is set as shown to the right.
3
21
3
21

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 13/46
2.8 Motor control
The STM8L1526-EVAL supports three-phase brushless motor control via a 34-pin
connector, CN7, which provides all required control and feedback signals to and from motor
power-driving board. Available signals on this connector include emergency stop, motor
speed, 3 phase motor current, bus voltage, heat sink temperature coming from the motor
driving board and 6 channels of PWM control signal going to the motor driving circuit.
The I/O pins used on the motor control connector, CN7, are multiplexed with some
peripherals on the board. The motor control application can be enabled by setting jumpers
JP3, JP4 and JP8.
Some rework that is required to be done to the board is listed below:
●Remove 0 ohm resistors, R69, R75,R80,R58,R35,R42,R31,R34,R62,R39,R55 and
R48 (all resistors are marked in red in Figure 7) to release I/Os used by motor control
and shared with another peripherals.
●Remove MicroSD Card from SD Card socket CN14 (SD Card socket is marked in red in
Figure 7).
●Solder resistor R82 (0 ohm), R59 (0 ohm) and R29 (0 ohm), all components to be
soldered are marked in green in Figure 7.
The LCD glass module has to be mounted in the IO position for motor control. Refer to
Section 2.4: LCD glass module for details.
Table 8. Motor control related jumpers
Jumper Description
JP4 JP4 redirects the PFC synchronization signal to the timer 3 input capture 2 pin, additionally
to the timer3 external trigger input.
Default setting: Not Fitted.
JP8 JP8 should be kept open when the encoder signal is input from pin31 of CN7.
JP8 should be kept closed when analog signal is from pin31 of CN7 for special motor.
Default setting: Not Fitted.
JP3 For motor control application, JP3 must be kept open to avoid conflict between speaker
and motor control connector, CN7.

Hardware layout and configuration STM8L1526-EVAL
14/46 Doc ID 15437 Rev 1
Figure 7. STM8L1526-EVAL motor control re-configuration of board

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 15/46
2.9 MicroSD Card
The 1 GByte MicroSD Card connected to the SPI port of the STM8L152C6 is available on
the board. MicroSD Card detection is managed by standard I/O port, PD6.
The LCD glass module must be mounted in the IO position for MicroSD Card. Refer to
Chapter 2.4: LCD glass module for details.
2.10 Analog input
The BNC connector, CN15, is connected to PF0 of the STM8L152C6 as an external analog
input or DAC output. The 50 ohm terminal resistor can be enabled by closing solder bridge
SB6. A low-pass filter can be implemented for the BNC connector by replacing R126 and
C86 for ADC input or replacing R127 and C86 for DAC output (with suitable resistor and
capacitor as requested by end user's application).
There are also 3 analog signals available on the board.
1. 10 Kohm potentiometer RV2 connected to PC7.
2. IDD measurement output signal connected to PD3 for MCU power consumption test.
3. External ADC input which can be connected to TP8 (AIN+) and TP5 (AIN-). Solder
bridge SB5 should be kept on open for this analog input.
The LCD glass module has to be mounted in the IO position for IDD measurement and
potentiometer RV2. Refer to Section 2.4: LCD glass module for details.
2.11 Serial Flash
The M25P128 serial Flash is connected to the SPI bus of the STM8L152C6. The chip select
is managed by standard I/O port, PE4.
The LCD glass module has to be mounted in the IO position for serial Flash. Refer to
Section 2.4: LCD glass module for details.
2.12 Temperature sensor
A temperature sensor STLM75M2E is connected to the I2C bus of the STM8L152C6
through two transistors to support a wide voltage range from 1.8 V to 3.3 V on the I2C bus.
A voltage lower than 1.8 V is not supported due to the VGS threshold of transistor TR1 and
TR2.
The LCD glass module has to be mounted in the IO position for the I2C_SMB signal. Refer
to Section 2.4: LCD glass module for details.

Hardware layout and configuration STM8L1526-EVAL
16/46 Doc ID 15437 Rev 1
2.13 Development and debug support
An embedded ST-LINK, STM8 debugger developed by STMicroelectronics, is available on
the STM8L1526-EVAL as the default debugger. Third-party debuggers are also supported
by the SWIM connector, CN12, or low-cost SWIM connector, CN16.
The SWIM connector or embedded ST-LINK can be enabled by setting jumper JP6.
A 60-pin connector CN8 is available also for STice user, it can be used even with MCU
silicon mounted on the board by setting jumper JP13. (The STice connector is available only
on the MB818 with an MCU socket).
Table 9. SWIM debugging related jumper
Jumper Description Setting
JP6
PA0 is connected to SWIM connector CN12, CN16 and embedded ST-LINK when
JP6 is set as shown to the right (default setting).
PA0 is connected to IR LED, LD6 when JP6 is set as show to the right.
Table 10. STice related jumper
Jumper Description Setting
JP13
PA1 is connected to Reset sources when JP13 is set as shown to the right, the
board is working on standalone mode without STice connected (default setting).
PA1 is connected to GND when JP13 is set as show to the right. All I/Os of
STM8L152C6 silicon on the board is kept on "floating input" which allows
debugging based on STice connected to CN8.
3
21
3
21
3
21
3
21

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 17/46
2.14 Display and input devices
The 122x32 dot-matrix LCD connected to the SPI port of the STM8L152C6, 4 general
purpose color LED's (LD 1,2,3,4), and one bicolor LED LD5 are available as display devices.
The 4-direction joystick (U17) with selection key and general purpose button (B2) are
available as input devices.
The STM8L1526-EVAL evaluation board also supports a second optional 2.4" TFT LCD that
can be mounted on the CN3 connector. The 2.4" TFT LCD is not populated by default.
MB542 is the reference of the 2.4" TFT LCD to be connected on CN3.
)
The LCD glass module must be mounted on the "IO" position for LCD, LED's and joystick.
Refer to Section 2.4: LCD glass module for details.
Table 11. LCD modules
122x32 dot-matrix LCD U7 (default) 2.4" TFT LCD CN3 (optional)
Pin on U7 Description Pin connection Pin on CN3 Description Pin connection
1 Vss GND 1 CS PB4
2 Vcc +3.3V 2 SCL PB5
3 VO - 3 SDI PB6
4 CLK PB5 4 RS -
5 SID PB6 5 WR -
6 CS PB4 6 RD -
7 A +5V 7 SDO PB7
8 K GND 8 RESET RESET#
9 VDD 3.3V
10 VCI 3.3V
11 GND GND
12 GND GND
13 BL_VDD 3.3V
14 BL_Control 3.3V
15 BL_GND GND
16 BL_GND GND

Hardware layout and configuration STM8L1526-EVAL
18/46 Doc ID 15437 Rev 1
2.15 IDD measurement and comparator
For IDD measurement the circuit shown in Figure 9 is implemented on the STM8L1526-
EVAL.
Figure 8. STM8L1526-EVAL IDD measurement circuit
In Run mode, IDD current is measured using MAX9938FEUK+ (U20) connected to the
2ohm shunt resistor. In this case IDD_CNT_EN remains at a high level during measurement
and the jumper must be connected between pin 1 and pin 2 of JP11.
In Halt mode, the operational amplifier MAX9938FEUK+ (U20) is connected on the 2 Kohm
shunt resistor. To measure a current corresponding to the Halt mode the procedure is:
1. Configure ADC to measure voltage on IDD_measurement pin.
2. Configure PE6 as interrupt input on falling edge.
3. Enter in Halt or active Halt mode with IDD_CNT_EN low.
4. LP_WAKEUP falling edge wakeup the MCU after 150 ms.
5. Start ADC conversion as soon as possible after wakeup in order to measure the
voltage corresponding to low power mode on 1 uF capacitor.
6. Reset the counter by programming IDD_CNT_EN high to avoid 2 Kohm to be
connected later on VDD_MCU.
In Halt mode, the 2 K resistor is connected when T3 goes off after entering Halt mode. Q12
output of the counter allows connection of the 2 K when the current IDD becomes very low.
The measurement timing is given in Figure 9.

STM8L1526-EVAL Hardware layout and configuration
Doc ID 15437 Rev 1 19/46
Figure 9. STM8L1526-EVAL IDD Halt mode measurement timing diagram
The Halt mode measurement procedure can be used in Halt mode and slow or fast active
Halt modes if the IDD current does not exceed 12 uA else the Run measurement procedure
should be used up to 12 mA.
2.16 Comparator
Three I/Os are used to implement a comparator feature to be used as low precision ADC in
Figure 10.
●Comparator noninverting input PD1 connected to the reference capacitor (Cref).
●One I/O PE0 used as output, connected to the reference resistor (Rref) used to charge
Cref.
●Comparator inverting input used as ADC input PC7 to be connected to the
potentiometer.
Figure 10. STM8L1526-EVAL low precision ADC based on comparator
0 150mS 300mS 450mS
MCU mode
Run
Halt
Wake-up IDD Measure
Halt mode IDD measurement timing
Q13 = LP_WAKEUP
(PE6)
Clear CNT
IDD_CNT_EN (PE7)
Q12= LOW_POWER_EN
(T3 pin 3)
Q13n = U21 pin 4
1 2
Cref
1 2
P1
10K GND
VDD_ADJ
GND
1 2
Rref
PE5
COMP2
TIM2/ 3
12
11
5
46
+
-
COMP2A
PD0
PE0
PD1
CMP_Rref
PC3
PC4
CMP_Cref
PC7
VREFINT 1.2V

Hardware layout and configuration STM8L1526-EVAL
20/46 Doc ID 15437 Rev 1
The measurement is performed in three steps:
1. Internal reference voltage VREFINT is connected to the comparator inverting input and
Cref to noninverting input to measure the time required to charge the capacitor to
internal reference voltage VREFINT by PE0 used as output through Rref.
2. The potentiometer is connected to inverting input to measure the time required to
charge Cref to the voltage on potentiometer.
3. The potentiometer voltage is calculated by software interpolation or using a conversion
table.
2.17 IR LED
One IR LED, LD6, is driven by either PA0 through two transistors T1 and T8, or PA0 directly;
depending on the setting of the solder bridge SB7.
Note: JP6 needs to be set correspondingly for IR LED, please refer to Table 9 for details.
Table 12. IR LED related solder bridges
Solder bridge Description
SB7 LD6 is driven by PA0 through two transistors, T1 and T8, when SB7 is set as pad1
connected to pad2 (default setting).
LD6 is driven by PA0 directly when SB7 is set as pad2 connected to pad3.
Table of contents
Other ST Motherboard manuals

ST
ST NUCLEO-8S207K8 User manual

ST
ST STA304 User manual

ST
ST STEVAL-ILL009V1 Installation and operating instructions

ST
ST STEVAL-L99615C User manual

ST
ST STM32H757I-EVAL User manual

ST
ST STM3210E-EVAL User manual

ST
ST STM32439I-EVAL User manual

ST
ST STM32L4R9I-EVAL User manual

ST
ST EVB-LIV4F User manual

ST
ST M24LR64-R User manual