ST STM32L152RCT6 Discovery kit User manual

January 2017 DocID018789 Rev 4 1/38
1
UM1079
User manual
Discovery kits with STM32L152RCT6
and STM32L152RBT6 MCUs
Introduction
The STM32L152RCT6 Discovery kit (32L152CDISCOVERY) and the STM32L152RBT6
(STM32L-DISCOVERY) allow to develop applications based on the STM32L1 Series and to
benefit from the ultra-low-power features of these microcontollers.
The 32L152CDISCOVERY is based on an STM32L152RCT6 (256 Kbytes of Flash
memory). The STM32L-DISCOVERY is based on an STM32L152RBT6 (128 Kbytes of
Flash memory).
These discovery kits include the ST-LINK/V2 in-circuit debugger, one LCD (24 segments, 4
commons), four LEDs, two pushbuttons, one linear touch sensor and four touchkeys.
Figure 1. 32L152CDISCOVERY board
1. Picture is not contractual.
www.st.com
Downloaded from Arrow.com.

Contents UM1079
2/38 DocID018789 Rev 4
Contents
1 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 Development toolchain supporting the 32L152CDISCOVERY . . . . . . . . . 7
2.5 Demonstration software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 Hardware and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1 STM32L152RCT6 microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
4.2 Embedded ST-LINK/V2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1 Using the ST-LINK/V2 to program/debug the microcontroller on board 14
4.2.2 Using the ST-LINK/V2 to program/debug an external application . . . . . 15
4.3 Power supply and power selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5 Pushbuttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.6 Linear touch sensor / touchkeys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.7 Built-in IDD measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.7.1 High IDD range mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.7.2 Low IDD range mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.7.3 IBIAS current measurement procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.8 Solder bridges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.9 LCD (24 segments, 4 commons) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5 Extension connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7 Electrical schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Downloaded from Arrow.com.Downloaded from Arrow.com.

List of tables UM1079
4/38 DocID018789 Rev 4
List of tables
Table 1. Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2. ON/OFF conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 3. Functions executed when clicking B1 button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Table 4. Jumper states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 5. Debug connector CN2 (SWD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 6. Solder bridges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 7. LCD connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 8. MCU pin description versus board function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 9. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 5/38
UM1079 List of figures
5
List of figures
Figure 1. 32L152CDISCOVERY board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. Hardware block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 3. Top layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 4. Bottom layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 5. STM32L152RCT6 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 6. STM32L152RCT6 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 7. Typical configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 8. 32L152CDISCOVERY connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 9. ST-Link connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 10. IDD measurement circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 11. Low IDD range measurement timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 12. LCD segment mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 13. Mechanical drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 14. 32L152CDISCOVERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 15. ST-LINK/V2 (SWD only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 16. MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 17. LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 18. IDD measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 19. Linear touch sensor/touchkeys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Ordering information UM1079
6/38 DocID018789 Rev 4
1 Ordering information
To order the 32L152CDISCOVERY ultra-low-power discovery board, refer to Table 1.
2 Conventions
Table 2 provides some definitions used in this user manual.
The following sections of this user manual are also applicable to the STM32L-DISCOVERY
except specific features of the STM32L152RBT6 microcontroller (128 Kbyte Flash memory,
16 Kbyte RAM, 4 Kbyte data EEPROM).
2.1 Quick start
Before using the discovery kit, please accept the Evaluation product license agreement
available on the 32L152CDISCOVERY page of the www.st.com/mcu web site.
2.2 Getting started
The following sequence allows to configure the 32L152CDISCOVERY and to launch the
discovery application:
•Check jumper positions on the board: JP1 and CN3 must be ON (discovery selected)
(see Figure 3).
•Connect the 32L152CDISCOVERY to a computer with an USB cable to power the
board. The red LEDs LD2 (PWR) and LD1 (COM) are lit up.The Function 1 is executed.
•Click on user button B1 to change the executed function as described in Table 3. The
4-LED bar shows the function being performed (1 to 4 bars can be switched ON).
Table 1. Ordering information
Part number Order code Description
32L152CDISCOVERY STM32L152C-DISCO Discovery kit based on STM32L152RCT6
STM32L-DISCOVERY STM32L-DISCOVERY(1)
1. STM32L-DISCOVERY is replaced by STM32L152C-DISCO.
Discovery kit based on STM32L152RBT6
Table 2. ON/OFF conventions
Convention Definition
Jumper JP1 ON Jumper placed between pin 2 and 3
Jumper JP1 OFF Jumper placed between pin 1 and 2
Solder bridge SBx ON SBx connections closed by solder
Solder bridge SBx OFF SBx connections left open
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 7/38
UM1079 Conventions
37
Depending on the function selected, the voltage value, the linear touch sensor position, the
touchkeys status or the STM32L152RCT6 current consumption is displayed on the LCD.
Please refer to the www.st.com/mcu web site for more details on the discovery project and
the STM32L152RCT6 features.
2.3 System requirements
•Windows PC (XP, Vista, 7)
•USB type A to Mini-B USB cable
2.4 Development toolchain supporting the 32L152CDISCOVERY
•Altium TASKING®VX-Toolset
•Atollic®TrueSTUDIO®
•IAR™ EWARM
•Keil™ MDK-ARM
Table 3. Functions executed when clicking B1 button
Func
tion LED LD3/4 Bar
status Value displayed on LCD Main function
1LD3 and
LD4 blink Measured STM32L152RCT6 VDD voltage Voltage measurement
2 LD3 ON Linear touch sensor position from 0 to 100%
Touch sensing
3 LD4 ON Status of the four touchkeys
4
LD3 and
LD4 OFF
STM32L152RCT6 consumption measured in Run mode
(4 MHz)
STM32L152RCT6
current consumption
measurement
STM32L152RCT6 consumption measured in Sleep mode
(4 MHz)
5
STM32L152RCT6 consumption measured in Run mode
(32 KHz)
STM32L152RCT6 consumption measured in Low-power
sleep mode (32 KHz)
6
STM32L152RCT6 consumption measured in Stop mode,
RTC ON
STM32L152RCT6 consumption measured in Stop mode,
RTC OFF
7 STM32L152RCT6 consumption measured in Standby mode
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Features UM1079
8/38 DocID018789 Rev 4
2.5 Demonstration software
The demonstration software, preloaded in the board Flash memory, uses the built-in IDD
measurement feature to automatically measure and display the MCU consumption on the
LCD (in Run and Low-power modes).This software also allows to demonstrate touch
sensing functionalities such as linear touch sensor or touchkeys.
The latest version of this demonstration source code and associated documentation can be
downloaded from www.st.com/mcu
3 Features
The 32L152CDISCOVERY offers the following features:
•An STM32L152RCT6 microcontroller (256 Kbyte Flash memory, 32 Kbyte RAM,
8 Kbyte data EEPROM) in a 64-pin LQFP package
•On-board ST-LINK/V2 with selection mode switch to use the kit as a standalone
ST-LINK/V2 (with SWD connector for programming and debugging)
•Board power supply: through USB bus or from an external 3.3 or 5 V supply voltage
•External application power supply: 3 V and 5 V
•IDD current measurement
•LCD
– DIP28 package
– 24 segments, 4 commons
•Four LEDs:
– LD1 (red/green) indicating USB communication
– LD2 (red) indicating that 3.3 V power supply is ON
– Two user LEDs, LD3 (green) and LD4 (blue)
•Two pushbuttons (user and reset)
•One linear touch sensor and four touchkeys
•An extension header for LQFP64 I/Os for quick connection to prototyping board and
easy probing
The STM32L-DISCOVERY offers the same features except an STM32L152RBT6
microcontroller (128 Kbyte Flash memory, 16 Kbyte RAM, 4 Kbyte data EEPROM) in a 64-
pin LQFP package.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 9/38
UM1079 Hardware and layout
37
4 Hardware and layout
The 32L152CDISCOVERY is designed around one STM32L152RCT6 packaged in an
LQFP64.
Figure 2 illustrates the connections between the STM32L152RCT6 microcontroller and its
peripherals (ST-LINK/V2, pushbuttons, LEDs, LCD, linear touch sensor, touchkeys, and
connectors). These connections are the same for the STM32L-DISCOVERY.
Figure 2. Hardware block diagram
Figure 3 and Figure 4 allow to locate these features on the board.
069
%OXH/('
/'
%
86(5
,2
0LQL
86%
*UHHQ/('
/'
%
567
5(6(7
,2,2
+HDGHU
+HDGHU
6:'
/&'VHJPHQWVFRPPRQV
,''
0HDVXUHPHQW
(PEHGGHG
67/,1.9
670/5&7
/LQHDUWRXFKVHQVRU
WRXFKNH\V
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
10/38 DocID018789 Rev 4
Figure 3. Top layout
1. Pin 1 of CN1, CN2, P1 and P2 connectors are identified by a square.
069
/'
&20
&1
6:'FRQQHFWRU
/&'
VHJPHQWV
-3
,''PHDVXUHPHQW
67/,1.9
9SRZHU
VXSSO\LQSXWRXWSXW
9SRZHU
VXSSO\LQSXWRXWSXW
6%
,''PHDVXUHPHQW
670/5&7
%
XVHUEXWWRQ
%
UHVHWEXWWRQ
/'
JUHHQ/('
/'
EOXH/('
/'
3:5
,''PRGXOH
&167/,1.',6&29(5<
VHOHFWRU
/LQHDUWRXFKVHQVRU
WRXFKNH\V
6%
%86(5
6%
%5(6(7
6%%227
-399%$7VHOHFWRU
RSWLRQDOQRWPRXQWHG
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 11/38
UM1079 Hardware and layout
37
Figure 4. Bottom layout
1. Pin 1 of CN1, CN2, P1 and P2 connectors are identified by a square.
4.1 STM32L152RCT6 microcontroller
The STM32L152RCT6 features 256 Kbytes of Flash memory, 32 Kbytes of RAM and
8Kbytes data of EEPROM.
This microcontroller embeds RTC, LCD, timers, USART, I2C, SPI, ADC, DAC, and
comparators.
069
6%6%6%6%
UHVHUYHG
6%6%6%6%
GHIDXOW
3FRQQHFWRU
3FRQQHFWRU
-3,''
&5
EDWWHU\KROGHU
RSWLRQDO
6%6%
;FU\VWDO
6%,''
PHDVXUHPHQW
6%6%
;FU\VWDO
6%
9''SRZHUHGIURP9
6%
%DWWHU\HQDEOH
6%1567
6%6:2
6%670B567
6%%227
6%0&
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
12/38 DocID018789 Rev 4
Figure 5. STM32L152RCT6 package
The STM32L152RCT6 provides the following benefits:
•Ultra low power proprietary 130 nm technology: speed and power consumption
independent of MCU power supply, and ultra low leakage
•Ultra Low power design (clock gating, low-power Flash with power-off capability):
reduced overall Run and Wait mode current consumption by turning off clocks of
unused peripherals or Flash
•Sub 1 µA hardware RTC and AWU system unit:
Ultra-low-power modes for applications requesting regular wake up
•Up to 6 Low-power modes: suitable for many applications from complete switch off to
continuous monitoring at ultra low frequency
•Advanced and flexible clock system (multiple internal and external clock sources):
switch and adjust frequency and clock sources on the fly depending on application
needs
•Direct memory access on board (up to 12 DMA channels): autonomy for peripherals,
independent from the core; can switch off Flash memory and CPU (large current
consumption contributors) while keeping peripherals active
•Ultra Low power and ultrasafe features (POR, PDR, BOR, PVD) allowing integrated
application safety and security
•Unique identifier to enhance user data confidentiality/reliability
•Ultrafast wakeup from lowest consumption low-power mode allowing fast switching
from static and dynamic power modes
•Analog functional down to 1.8 V, and programming down to 1.65 V
•Full functionality over the complete VDD range
For more information, refer to STM32L152RCT6 datasheet available on ST website.
069
670/5&7
.E\WHVRI)ODVKPHPRU\
.E\WHVRI5$0
.E\WHVRIGDWD((3520
/4)3[PP
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 13/38
UM1079 Hardware and layout
37
Figure 6. STM32L152RCT6 block diagram
06Y9
32:(5
92/75(*
ELW$'&
(;7,7
:.83
:LQ:$7&+'2*
-7$*6:
)PD[0+]
-7',
1-7567
1567
86%)6GHYLFH
65$0.
[[ELW
,&
7,0(5
7,0(5
;7$/26&
0+]
;7$/N+]
((3520%LW
%DFNXSLQWHUIDFH
7,0(5
57&9
$:8
5&+6,
REO
86%65$0%
7UDFH&RQWUROOHU(70
86$57
86$57
63,,6
%DFNXS
5HJ
,&
86$57
5&06,
6WDQGE\
LQWHUIDFH
:'*.
%25%JDS
63,
,)
# 9 '' $
39'
*3,23g57&
*3,23257'
*3,23257(
/&'[
ELW'$&
),),,)
ELW'$&
'$&B287DV$)
'$&B287DV$)
038
*3&RPS
383'
3'5
3'5
7,0(5
7,0(5
*HQHUDOSXUSRVH
WLPHUV
/&'%RRVWHU
*3,23257+
5&/6,
7,0(56ELWV
[[ELW
63,,6
75$&(&.75$&('75$&('75$&('75$&('
6\VWHP
&DSVHQV
6XSSO\
PRQLWRULQJ
#9''$
#9''$
#9''$
#9''$
6XSSO\PRQLWRULQJ
&DSVHQVLQJ
*3,23257%
*3,23257$
$3%)PD[ 0+]
$3%)PD[ 0+]
3//
&ORFN
0JPW
9,13
9,10
9287
9,13
9,10
9287
57&B287
$+%$3% $+%$3%
-7&.6:&/.
-7066:'$7
-7'2
DV$)
.%352*5$0
.%'$7$
.%%227
#9''
9''&25(
9UHI
0&38
*3'0$FKDQQHOV
*3'0$FKDQQHOV
$+%3&/.
$3%3&/.
+&/.
)&/.
#9''
9'' 9WR9
9VV
26&B,1
26&B287
7$03(5
FKDQQHOV
FKDQQHOV
FKDQQHOV
FKDQQHOV
5;7;&76576
6PDUW&DUGDV$)
5;7;&76576
6PDUW&DUGDV$)
026,0,626&.166:6&.
0&.6'DV$)
026,0,626&.166:6&.
0&.6'DV$)
6&/6'$
$V$)
6&/6'$60%XV30%XV
$V$)
86%B'3
86%B'0
3[
6(*[
&20[
23$03
23$03
&203[B,1[
9''$
966$
3$>@
$)
3+>@
3%>@
3&>@
3'>@
3(>@
7,0(5
7,0(5
7,0(5
FKDQQHOV
FKDQQHO
FKDQQHO
026,0,62
6&.166DV$)
5;7;&76576
6PDUW&DUGDV$)
$)
9''5()B$'&
9665()B$'&
SEXV
LEXV
'EXV
%25
,QW
$+%)PD[ 0+]
%XV0DWUL[06
9/&' 9WR9
9/&'
#9''
7HPSVHQVRU
26&B,1
26&B287
19,&
((3520
,QWHUIDFH
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
14/38 DocID018789 Rev 4
4.2 Embedded ST-LINK/V2
The ST-LINK/V2 programming and debugging tool is integrated on the
32L152CDISCOVERY. The embedded ST-LINK/V2 can be used in 2 different ways
according to the jumper states (see Table 4):
•Program/debug the MCU on board
•Program/debug an MCU in an external application board using a cable connected to
SWD connector CN2
The embedded ST-LINK/V2 supports only SWD for STM32 devices. For information about
debugging and programming features, refer to the user manual ST-LINK/V2 in-circuit
debugger/programmer for STM8 and STM32 (UM1075).
Figure 7. Typical configuration
4.2.1 Using the ST-LINK/V2 to program/debug the microcontroller on board
Figure 8 shows how to plug the two jumpers on CN3 to program the STM32L152RCT6 on
the board. The usage of CN2 is forbidden as it could disturb communication with the
microcontroller.
Table 4. Jumper states
Jumper state Description
Both CN3 jumpers ON ST-LINK/V2 functions enabled for on board programming
(default)
Both CN3 jumpers OFF ST-LINK/V2 functions enabled for external application through
CN2 connector (SWD supported).
069
+DUGZDUHUHTXLUHPHQWV
86%FDEOHW\SH$WRPLQL%
FRPSXWHUZLWK:LQGRZV;3
'HYHORSPHQWWRROFKDLQ
,$5(:$50
.HLO0'.$50
*&&EDVHG,'(
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 15/38
UM1079 Hardware and layout
37
Figure 8. 32L152CDISCOVERY connections
4.2.2 Using the ST-LINK/V2 to program/debug an external application
The ST-LINK/V2 allows also to program an STM32 device on an external application.
Figure 9 shows how to remove the 2 jumpers from CN3 and to connect the external
application to the CN2 debug connector according to instructions in Table 5.
Note: SB100 must be OFF if you the CN2 pin 5 is used in the external application.
&1MXPSHUV21
3LQRI&1
6:'FRQQHFWRU
069
Table 5. Debug connector CN2 (SWD)
Pin CN2 Designation
1 VDD_TARGET VDD from application
2 SWCLK SWD clock
3 GND Ground
4 SWDIO SWD data input/output
5 NRST RESET of target MCU
6SWOReserved
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
16/38 DocID018789 Rev 4
Figure 9. ST-Link connections
4.3 Power supply and power selection
The power supply is provided either by the host computer through the USB cable, or by an
external 5 V or 3.3 V power supply.
The D1 and D2 protection diodes allow to use the EXT_5V and EXT_3V pins independently
as input or output power supplies (see Figure 3):
•EXT_5V and EXT_3V can be used as output power supplies when the application
board is connected to pins P1 and P2. In this case, the EXT_5V and EXT_3V pins
deliver a 5 V or 3 V power supply and power consumption must be lower than 100 mA.
•EXT_5V and EXT_3V can also be used as input power supplies when the USB
connector is not connected to the computer. In this case, the power of the board must
be provided by a power supply unit or by an auxiliary equipment complying with
standard EN-60950-1: 2006+A11/2009. This power source must be Safety Extra Low
Voltage (SELV) with limited power capability.
Battery powered (optional)
The 32L152CDISCOVERY board has been designed to run from a CR2032 standalone
battery (no connection with USB or other power supply is required).
&1MXPSHUV2))
3LQRI&1
6:'FRQQHFWRU
069
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 17/38
UM1079 Hardware and layout
37
By default, no battery holder is mounted on the board and SB21 and SB22 are configured in
their default state (see Table 6: Solder bridges on page 21).
Follow the procedure below to power the 32L152CDISCOVERYfrom the battery:
•Solder a B7410AP2L battery holder from LOTES on CR1
•Configure SB100 OFF
•Remove both jumpers from CN3 (see Figure 9: ST-Link connections on page 16)
•Select the battery as power supply. Two solutions are possible:
– Solder bridge: configure SB21 OFF, and SB22 ON. No header is required on JP2.
– Jumper: configure SB21 and SB22 OFF. Solder a header on JP2, identical to JP1
on the top side. Set a jumper between VDD and VBAT to power the
STM32L152RCT6 of the board
Note: In this configuration, it is possible to power the STM32L152RCT6 from the 3 V supply
voltage of the board by setting a jumper between VDD and 3V.
•Plug the CR2032 battery into CR1 holder.
The demonstration is now ready to run.
Warning: Wrong solder bridge configuration can damage board
components.
4.4 LEDs
•LD1 COM: LD1 default status is red. LD1 turns to green to indicate that
communications are in progress between the computer and the ST-LINK/V2.
•LD2 PWR: red LED indicates that the board is powered.
•User LD3: user green LED connected to the I/O PB7 of the STM32L152RCT6.
•User LD4: user blue LED connected to the I/O PB6 of the STM32L152RCT6.
4.5 Pushbuttons
•B1 USER: User pushbutton connected to the I/O PA0 of the STM32L152RCT6.
•B2 RESET: Pushbutton is used to RESET the STM32L152RCT6.
4.6 Linear touch sensor / touchkeys
To demonstrate touch sensing capabilities, the 32L152CDISCOVERY includes a linear
touch sensor which can be used either as a 3-position linear touch sensor or as 4
touchkeys. Both functionalities are illustrated in the demonstration software (see Table 3:
Functions executed when clicking B1 button on page 7).
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
18/38 DocID018789 Rev 4
Three pairs of I/O ports are assigned to the linear touch sensor / touchkeys. Each pair must
belong to the same analog switch group:
•PA6, PA7 (group 2)
•PC4, PC5 (group 9)
•PB0, PB1 (group 3)
To minimize the noise, these pairs are dedicated to the linear touch sensor / touchkeys and
are not connected to external headers.
To design a touch sensing application, refer to the following documentation and firmware:
•For details concerning I/O ports, refer to the STM32L152RCT6 datasheet.
•For information on software development, see discovery application software on
www.st.com/mcu.
•For more detail concerning touch sensing application design and layout, refer to
Guidelines for designing touch sensing applications with surface sensors (AN4312).
•STM32 touch sensing library available from www.st.com/mcu
4.7 Built-in IDD measurement circuit
The 32L152CDISCOVERY built-in IDD measurement circuit allows to measure the
consumption of the STM32L152RCT6 and to display the value on the LCD glass while the
MCU is in Run or Low-power modes.
•JP1 ON: the STM32L152RCT6 is powered through the IDD measurement circuit
(default).
•JP1 OFF: the STM32L152RCT6 is directly powered. The IDD measurement circuit is
bypassed.
Note: When jumper JP1 is removed, the current consumption of the STM32L152RCT6 can be
measured by connecting an ammeter between jumper pin 1 and pin 2 of JP1.
To perform the IDD measurement by the MCU itself, the circuit shown in Figure 10 is
implemented on the 32L152CDISCOVERY. The solder bridges SB1, SB2 and SB14 must
be closed and JP1 must be ON.The low IDD range procedure (see Section 4.7.2) is
recommended when the MCU is in Low-power mode and the IDD current does not exceed
60 μA. The high IDD range procedure (see Section 4.7.1)is applicable when the MCU
operates in Run mode and can sink up to 30 mA.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

DocID018789 Rev 4 19/38
UM1079 Hardware and layout
37
Figure 10. IDD measurement circuit
4.7.1 High IDD range mode
In high IDD range mode, the IDD current is measured using the operational amplifier
MAX9938FEUK+ (U5) connected to the 2 Ωshunt resistor (R21). In this case IDD_CNT_EN
remains high during the measurement. R22 remains in short-circuit during the measurement
because the FET transistor 1 of U20 remains ON permanently.
4.7.2 Low IDD range mode
In low IDD range mode, the operational amplifier MAX9938FEUK+ (U5) is connected to the
1KΩshunt resistor (R22), controlled by the FET transistor 1 of U20. In this case the counter
74HC4060 (U3) enabled by IDD_CNT_EN manages the measurement timing according to
Figure 11.
Low IDD range measurement principle
The principle used to measure the consumption current when the STM32L152RCT6 is in
low IDD range mode is as follows:
1. Configure ADC to measure voltage on the IDD_Measurement pin.
2. Configure PA0 to serve as wakeup pin.
3. Enter low IDD range mode after setting IDD_CNT_EN (PC13) signal low.
4. IDD_WAKEUP rising edge wakes up the MCU after around 300 ms.
5. Start ADC conversion as soon as possible after wakeup in order to measure the
voltage corresponding to Low-power mode on capacitor C13.
6. Reset the counter by programming IDD_CNT_EN high (in less than 150 ms after the
wakeup) to avoid the R22 1 KΩresistor being connected later in Run mode.
The measurement timing is given in Figure 11. In low IDD range mode, the 1 KΩresistor is
connected when the FET transistor 1 of U20 goes OFF, after entering low IDD range mode.
069
5
.
3$
3&
3$
8
/;*&75
,2
2,
*1'
&
9&&
8
+*675
9'' 5
5
.
9''
4
4
4
4
4
4
4
*1'
&2
&2
&,
&/5
4
4
4
9&&
8
0+&775
9''
9''
5
.
5
. &
X)
9''B0&8
-3
&
Q)
5
.
5
.
2VFLOODWRU IUHTXHQF\ .+]
9''
5
,''B0HDVXUHPHQW
,''B:$.(83
,''B&17B(1
&
Q)
6%
6%
6%
,'' 0HDVXUH
RQRII
8
0$;)(8.
9''
6
'
*
'
6
'
*
'
8
676'3)/
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Hardware and layout UM1079
20/38 DocID018789 Rev 4
The Q13 output of the counter allows connecting the 1 KW resistor when the current IDD
becomes very low.
Figure 11 shows how the counter and the FET transistor 1 of U20 ensure that, 150 ms after
IDD_CNT_EN falling edge, the shunt resistor R22 is connected between VDD_MCU and
the power supply to reduce the measurement range to 60 μA for the full scale. Then after
another 150 ms required for current stabilization, R22 is shorted, the IDD measurement is
stored in C13, and the MCU is woken up. After wakeup, the MCU measures the IDD current
corresponding to the Low-power mode stored in C13.
Figure 11. Low IDD range measurement timing diagram
4.7.3 IBIAS current measurement procedure
In low IDD range mode, the bias current of the operational amplifier input (U5 pin 4) is not
negligible compared to IDD current (typical IBIAS is ~240 nA). To obtain a reliable IDD
measurement, it is mandatory to subtract the bias current from the low IDD current value
since this current is not sunk by the MCU. IBIAS is measured during production test and
stored in the MCU data EEPROM. The discovery demonstration software uses this value to
display the correct IDD.
The procedure for IBIAS measurement implemented in the demonstration software is:
1. Power off the board (disconnect the USB cable).
2. Set JP1 OFF.
3. Push down B1 (USER button), power on the board from the USB.
4. Wait at least 1 second before releasing B1. The LCD displays the IBIAS measurement.
5. Power off the board (disconnect the USB cable).
6. Set JP1 ON. The IBIAS value is stored in data EEPROM. The bias current is then
subtracted from the IDD measured in IDD range mode.
069
,''B&17B(1
4 /2:B32:(5B(1
8SLQ
4 ,''B:$.(83
4 8SLQ
5XQPRGH /RZSRZHUPRGH :DNHXS ,''
PHDVXUHPHQW
&OHDU
8FRXQWHU
8FRXQWHUHQDEOHG
PV
PV
PV
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.
This manual suits for next models
4
Table of contents
Other ST Motherboard manuals

ST
ST AEKD-USBTYPEC1 User manual

ST
ST STEVAL-USBPD45H User manual

ST
ST STM3210E-EVAL User manual

ST
ST eMotion STEVAL-MKI109V1 User manual

ST
ST STM32H747I-DISCO User manual

ST
ST EVAL-L9001 User manual

ST
ST STM32H5 User manual

ST
ST FP-SNS-6LPNODE1 User manual

ST
ST SPC58XXADPT144S REV.B User manual

ST
ST STEVAL-SPIN3202 User manual