stm32f4 Clicker Manual v100

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

A compact starter kit with your favorite

microcontroller and a socket for click™ add-on


boards. New ideas are just a click away.
TO OUR VALUED CUSTOMERS

I want to express my thanks to you for being interested in our products and for having
confidence in MikroElektronika.

The primary aim of our company is to design and produce high quality electronic products
and to constantly improve the performance thereof in order to better suit your needs.

Nebojsa Matic
General Manager

The PIC® and Windows® logos and product names are trademarks of Microchip Technology® and Microsoft® in the U.S.A. and other countries.
Page 2
Table of contents

1. What is STM32 M4 clicker? 4 step 4 – Uploading .HEX file 12


2. Power supply 6 step 5 – Finish upload 13
3. STM32F415RG microcontroller 8 Programming with mikroProg™ programmer 14
Key microcontroller features 8 mikroProg Suite for ARM software
™ ®
15
4. Programming the microcontroller 9 Programming with ST-LINK V2 programmer 16
Programming with mikroBootloader 10 5. Buttons and LEDs 18
step 1 – Connecting STM32 M4 clicker 10 6. RTC battery 20
step 2 – Browsing for .HEX file 11 7. click boards are plug and play!

22
step 3 – Selecting .HEX file 11 8. Dimensions 24

Page 3
1. What is STM32 M4 clicker? 01 64-pin STM32F415RG MCU

02 Connection pads

03 16 MHz crystal oscillator


01 02 03 04 05
04 mikroBUS™ socket

05 RESET button
12
06 USB Mini-B connector

07 3.3V Voltage regulator


13 08 JTAG Programmer connector

09 32.768 KHz crystal oscillator

12 10 RTC battery pads

11 Power indication LED

06 07 08 9 10 Figure 1-1: STM32 M4 clicker 11 12 Additional buttons

13 Additional LEDs

STM32 M4 clicker is an amazingly compact starter development kit which brings the innovative mikroBUS™ socket to your favorite
microcontroller. It features STM32F415RG, a 32-bit ARM® Cortex®-M4 microcontroller, two indication LEDs, two general purpose buttons, a
reset button, a USB Mini-B connector and a single mikroBUS™ socket. A JTAG connector and pads for interfacing with external electronics are
provided as well. The mikroBUS™ connector consists of two 1x8 female headers with SPI, I2C, UART, RST, PWM, Analog and Interrupt lines as
well as 3.3V, 5V and GND power lines. STM32 M4 clicker board can be powered over a USB cable.

Page 4
3.3V VOLTAGE REGULATOR T1 VCC-3.3 VCC-3.3 T2 VCC-3.3

C13 R1 R2
4K7 4K7 C9 C10 C11 C14 C15 C16
VCC-3.3
VCC-3.3 VCC-5V U2 10uF 100nF 100nF 100nF 100nF 100nF 2.2uF
1 5
IN OUT
R10 2

PC0/T1

PC1/T2
GND R3
470
3 4 287K
EN ADJ
PWR AP7331-ADJ R5

2.2uF
39K

C12

PB7
PB6

TDO
PB5/RST
PB9
PB8

PC11/RX
PC10/TX

TCK-SWC
TDI
VCC-3.3

VCC-5V

64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
J1A CN1
R11 FP1
U1
220 FERRITE
USB-DET 1

PB9
PB8
BOOT0
PB7
PB6
PB5
PB4
PB3
PD2
PC12
PC11
PC10
PA15
PA14
VDD
VSS
C1 VBUS
USB-D_N 2
22pF C2 D-
X2 1 48 USB-D_P 3 D+
VBAT VDD 2.2uF
32.768KHz 2 47 USB-ID 4 ID
C3 PC13 VCAP2
3 46 TMS-SWD 5 GND
22pF PC14 PA13
4 45 USB-D_P
PC15 PA12
5 44 USB-D_N C5
PH0 PA11 100nF
6 43 USB-ID USB MINIB
C4 PH1 PA10
#RST 7 42 USB-DET
22pF NRST PA9
X1 PC0/T1 8 41
16MHz
C6
PC1/T2 9
PC0
PC1 STM32F415RG PA8
PC9
40
10 39
22pF PC2 PC8
11 38
CN3 12
PC3 PC7
37
LD2
VSSA PC6 R9
13 36 PB15/MOSI PA2/LED2
VCC-3.3 VDDA PB15
PA0/AN 14 35 PB14/MISO 4K7
PA0 PB14
PA1/LED1 15 34 PB13/SCK
R6 PA1 PB13
PA2/LED2 16 33 PB12/CS
10K PA2 PB12 R8
PA1/LED1

VCAP1
R7

PB10
PB11
#RST

VDD

VDD
4K7

VSS
PA3

PA4
PA5
PA6
PA7
PC4
PC5
PB0
PB1
PB2
T3 1K
VCC-3.3 LD1
RST

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
C8
100nF
1
2
PA4

PB11/SDA
PB0/PWM

PB10/SCL
3

PB1/INT
PA5
4
C7 PA6

PA4
PA5
PA6
PA7
5
2.2uF PA7
VCC-3.3 VCC-5V 6
PB9
7
PB8
R4 8
PB7
100K 9
PB6
PA0/AN PB0/PWM 10
AN PWM
PB5/RST PB1/INT HD2
RST INT VCC-3.3
PB12/CS PC11/RX
CS RX
PB13/SCK PC10/TX
SCK TX
PB14/MISO PB10/SCL CN2
MISO SCL 1 2 TMS-SWD
PB15/MOSI PB11/SDA
MOSI SDA
3.3V
GND
5V
GND
3
5
4
6
TCK-SWC
TDO Figure 1-2:
7 8 TDI
9 10 #RST
STM32 M4 clicker
JTAG
schematic

Page 5
2. Power supply

Figure 2-1:
Connecting USB power supply
through CN1 connector

When the board is powered up the power indication LED will be automatically turned on. The USB connection can provide up to
500mA of current which is more than enough for the operation of all on-board and additional modules.

Page 6
3.3V VOLTAGE REGULATOR

VCC-3.3 C13 VCC-5V


VCC-3.3 CN1
1 FP1
VCC-3.3 VCC-5V U2 10uF FERRITE
2 1
1 5 VBUS
3 IN OUT 2
D-
4 R10 2 3 D+
GND R3
5 470 4 ID
3 4 287K
6 EN ADJ 5 GND
7
8
PWR 2.2uF AP7331-ADJ R5
C5
39K
C12

9 100nF USB MINIB


10
HD2

Figure 2-2: Power supply schematic

Page 7
3. STM32F415RG microcontroller
The STM32 M4 clicker development tool comes with the
STM32F415RG microcontroller. This 32-bit high performance
JTAG & SW
microcontroller is rich with on-chip peripherals and features FLASH 1MB
GPIOs 51
1024KB of Flash and 192KB of SRAM. It has integrated full speed RNG

USB 2.0. support. DMA 2 SRAM 192


KB
USB OTG FS
DMA 1
SRAM 4KB
USB OTG HS
AHB BUS -
MATRIX
GPIO PORT
Key microcontroller features
- Up to 168 MHz operation
(A,B,C,D,H)

SDIO/MMC
ARM
Cortex™-M
IWDG

RTC
4

z
2 x TIM/PW STM32F415 2 x TIMER 32

APB2 84MH
- 32-bit ARM® Cortex®-M4 architecture M 16-bit -bit

z
RG

APB1 42MH
3 x TIMER 16 5 x TIMER 16
- 1024KB of Flash memory -bit -bit
2 x USART POWER / RE 2 x USART
- 192KB SRAM SET
1 x SPI 2 x UART
- 64 pin LQFP WWDG
temperature 2 x SPI
- 3x 16 ch, 12-bit ADC sensor 2 x TIMER 16
-bit
3 x ADC 3 x I2C
- USB 2.0, UART, RTC, SPI, I2C, etc. 2 x DAC
2 x CAN

Page 8
4. Programming the microcontroller

Figure 4-1:
STM32F415RG
microcontroller

The microcontroller can be programmed in two ways:

01 Using USB HID mikroBootloader,


02 Using external mikroProg™ for STM32 programmer.

Page 9
Programming with mikroBootloader
You can program the microcontroller with a step 1 – Connecting STM32 M4 clicker
bootloader which is preprogrammed by default.
To transfer .hex file from a PC to MCU you need
bootloader software (mikroBootloader USB HID)
which can be downloaded from:

www.mikroe.com/downloads/get/2144/
mikrobootloader_usb_hid_STM32F415RG.zip
01
After the mikroBootloader software is downloaded,
unzip it to desired location and start it.

Figure 4-2: USB HID mikroBootloader window

01 To start, connect the USB cable, or if already connected press


the Reset button on your STM32 M4 clicker. Click the Connect
button within 5s to enter the bootloader mode, otherwise
existing microcontroller program will execute.

Page 10
step 2 – Browsing for .HEX file step 3 – Selecting .HEX file

01

01

02

Figure 4-3: Browse for HEX Figure 4-4: Selecting HEX

01 Click the Browse for HEX button and from a 01 Select .HEX file using open dialog window.
pop-up window (Figure 3.4) choose the .HEX file
02 Click the Open button.
which will be uploaded to MCU memory.

Page 11
step 4 – Uploading .HEX file

01

01
Figure 4-5: Begin uploading Figure 4-6: Progress bar

01 To start .HEX file bootloading click the 01 Progress bar enables you to monitor .HEX file uploading.
Begin uploading button.

Page 12
step 5 – Finish upload

01

Figure 4-7: Restarting MCU Figure 4-8: mikroBootloader ready for next job

01 Click OK button after the uploading process is finished.

02 Press Reset button on STM32 M4 clicker board and wait


for 5 seconds. Your program will run automatically.

Page 13
Programming with mikroProg™ programmer

Figure 4-9: mikroProg™ connector

The microcontroller can be programmed with external mikroProg™ for STM32 programmer and mikroProg Suite™ for ARM® software.
The external programmer is connected to the development system via 2x5 JTAG connector soldered on the CN2 connector pads,
Figure 4-9. mikroProg™ is a fast USB 2.0 programmer with hardware debugger support. It supports STM32 M3 and M4 devices from
STMicroelectronics. Outstanding performance, easy operation and elegant design are its key features.

Page 14
mikroProg Suite™ for ARM® software
On-board mikroProg™ programmer requires special programming software called mikroProg Suite™
for ARM®. This software is used for programming of all supported microcontroller families with
ARM® Cortex™-M3 and Cortex™-M4 cores. The software has an intuitive interface and SingleClick™
programming technology. To begin, first locate the installation archive on the link bellow:

http://www.mikroe.com/downloads/get/1809/mikroprog_suite_for_arm.zip

After downloading, extract the package and double click the executable setup file, to start installation.

Quick guide
01 Click the Detect MCU button in order to recognize the device ID.

02 Click the Read button to read the entire microcontroller memory.


You can click the Save button to save it to the target HEX file.

03 If you want to write the HEX file into the microcontroller, first
make sure to load the target HEX file using the Load button.
Then click the Write button to begin programming. Figure 4-10:
mikroProg Suite™
04 Click the Erase button to clear the microcontroller memory. for ARM® window

Page 15
Programming with ST-LINK V2 programmer
In order to adjust the ST-LINK™ V2 programmer The microcontroller can also
to be connected to the development system, it be programmed with the
is necessary to provide the appropriate adapter ST-LINK V2 programmer
such as the mikroProg to ST-LINK V2 adapter. and mikroProg Suite™ for
2x5 male headers should be first soldered on ARM® software, Figure 5-1.
the CN2 connector pads. Then you should plug This programmer connects
the adapter into the ST-LINK V2 programmer with mikromedia board via
(2x10 header), and plug an IDC10 flat cable in mikroProg to ST-LINK V2
headers, Figure 4-12. adapter (Figure 4-11).

Figure 4-11: Figure 4-12:


mikroProg™ to Connecting ST-LINK™
ST-LINK™ V2 adaper V2 programmer

Page 16
VCC-3.3

TDO

TCK-SWC
TDI
C9 C10 C11 C14 C15 C16
VCC-3.3
100nF 100nF 100nF 100nF 100nF 2.2uF

64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
J1A
U1

PB9
PB8
BOOT0
PB7
PB6
PB5
PB4
PB3
PD2
PC12
PC11
PC10
PA15
PA14
VDD
VSS
C1 C2
22pF 1 48
X2 VBAT VDD 2.2uF
2 47
32.768KHz PC13 VCAP2
C3 3 46 TMS-SWD
22pF PC14 PA13
4 45
PC15 PA12
5 44
PH0 PA11
6 43
C4 PH1 PA10
#RST 7 42
22pF NRST PA9
8 41
X1
16MHz C6
9
PC0
PC1 STM32F415RG PA8
PC9
40
10 39
22pF PC2 PC8
11 38
CN3 PC3 PC7
12 37
VSSA PC6
13 36
NOTE Before attaching 14
VDDA
PA0
PB15
PB14
35
the programming 15
PA1 PB13
34
16 33
PA2 PB12
connector, you VCC-3.3

VCAP1
PB10
PB11
have to solder the

VDD

VDD
VSS
PA3

PA4
PA5
PA6
PA7
PC4
PC5
PB0
PB1
PB2
CN2
1 2 TMS-SWD
provided 2x5 male 3 4 TCK-SWC
5 6 TDO

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
header to the JTAG 7 8 TDI
(CN2) pads. 9 10 #RST
C7
JTAG 2.2uF

Figure 4-13: mikroProg™ connection schematic

Page 17
5. Buttons and LEDs
01

02

03
Figure 5-1: Two buttons, two LEDs and a reset button

The board also contains a 01 reset button and a pair of 02 buttons and 03 LEDs. Each of these additional peripherals are located
in the bottom area of the board. Reset button is used to manually reset the microcontroller. Pressing the reset button will
generate a low voltage level on microcontroller’s reset pin. LEDs can be used for visual indication of the logic state on two pins
(PA1 and PA2). An active LED indicates that a logic high (1) is present on the pin. Pressing any of these buttons can change the
logic state of the microcontroller pins (PC0 and PC1) from logic high (1) to logic low (0).
Page 18
VCC-3.3

VCC-3.3 C9 C10 C11 C14 C15 C16

100nF 100nF 100nF 100nF 100nF 2.2uF

64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
J1A
U1

PB9
PB8
BOOT0
PB7
PB6
PB5
PB4
PB3
PD2
PC12
PC11
PC10
PA15
PA14
VDD
VSS
C1
22pF C2 LD2
X2 1 48 2.2uF
VBAT VDD R9
32.768KHz 2 47 PA2/LED2
PC13 VCAP2
C3 3 46
22pF PC14 PA13 4K7
4 45
PC15 PA12
5 44
PH0 PA11 R8
6 43 PA1/LED1
C4 PH1 PA10
#RST 7 42
X1 22pF NRST PA9 4K7
PC0/T1 8 41
16MHz
C6
PC1/T2 9
PC0
PC1 STM32F415RG PA8
PC9
40
LD1
10 39
22pF PC2 PC8
11 38
CN3 PC3 PC7
12 37
VSSA PC6 T1 VCC-3.3 VCC-3.3 T2
VCC-3.3 13 36
VDDA PB15
PA0/AN 14 35
R6 PA0 PB14
PA1/LED1 15 34 R1 R2
10K PA1 PB13
R7 PA2/LED2 16 33 4K7 4K7
#RST PA2 PB12

VCAP1
PB10
PB11
T3 1K
VDD

VDD
VSS
PA3

PA4
PA5
PA6
PA7
PC4
PC5
PB0
PB1
PB2
RST C8

PC0/T1

PC1/T2
100nF
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
C7
2.2uF

Figure 5-2: Other modules connection schematic

Page 19
6. RTC battery

STM32 M4 clicker features RTC battery pads for Figure 6-1:


powering microntroller’s internal RTC module. Battery battery pads
is used as an alternative source of power, so the and jumper J1
RTC module can keep track of time while primary
source of power is OFF or unavailable. In order to
use this option it is necessary to connect (solder)
external battery (type CR2032; voltage range from
1.65 to 3.6 V) and unsolder jumper J1, Figure 6-1.
Make sure that orientation of the battery is correct
(plus on VBAT and minus on GND pad), otherwise it
won’t work properly.

Page 20
VCC-3.3

64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
J1
U1

PB9
PB8
BOOT0
PB7
PB6
PB5
PB4
PB3
PD2
PC12
PC11
PC10
PA15
PA14
VDD
VSS
C1
22pF C2
X2 1 48 2.2uF
VBAT VDD
32.768KHz 2 47
C3 PC13 VCAP2
3 46
22pF PC14 PA13
4 45
PC15 PA12
5 44
PH0 PA11
6 43
C4 PH1 PA10
7 42
22pF NRST PA9
X1 8 41
16MHz
C6
9
PC0
PC1 STM32F415RG PA8
PC9
40
10 39
22pF PC2 PC8
11 38
CN3 PC3 PC7
12 37
VSSA PC6
13 36
VDDA PB15
14 35
PA0 PB14
15 34
PA1 PB13
16 33
PA2 PB12
VCC-3.3

VCAP1
PB10
PB11
VDD

VDD
VSS
PA3

PA4
PA5
PA6
PA7
PC4
PC5
PB0
PB1
PB2
C9 C10 C11 C14 C15 C16

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
100nF 100nF 100nF 100nF 100nF 2.2uF

C7
2.2uF

Figure 6-2: RTC battery schematic


Page 21
7. click boards are plug and play!
Up to now, MikroElektronika has released more than
90 mikroBUS™ compatible click™ Boards. On the
average, one click board is released per week. It is
our intention to provide you with as many add-on
boards as possible, so you will be able to expand your
development board with additional functionality.
Each board comes with a set of working example
code. Please visit the click™ boards webpage for the
complete list of currently available boards:

www.mikroe.com/click

Figure 7-1:
STM32 M4 clicker driving
a GSM click board

Page 22
RFid click™ Relay click™ 8x8 click™ FM click™ Bluetooth2 click™ Thunder click™ USB SPI click™

BarGraph click™ 7seg click™ THERMO click™ Gyro click™ EEPROM click™ LightHz click™ Pressure click™

Page 23
8. Dimensions

75.6
2979
71.6
2819
8 1.6
2.54 315 63
100

Legend
mm
mils
Mounting hole size
Ø2
Ø 79
17.2 25.4 4
679 1000 159

Page 24
DISCLAIMER

All the products owned by MikroElektronika are protected by copyright law and international copyright treaty. Therefore, this manual is to be treated as any
other copyright material. No part of this manual, including product and software described herein, may be reproduced, stored in a retrieval system, translated
or transmitted in any form or by any means, without the prior written permission of MikroElektronika. The manual PDF edition can be printed for private or
local use, but not for distribution. Any modification of this manual is prohibited.

MikroElektronika provides this manual ‘as is’ without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties
or conditions of merchantability or fitness for a particular purpose.

MikroElektronika shall assume no responsibility or liability for any errors, omissions and inaccuracies that may appear in this manual. In no event shall
MikroElektronika, its directors, officers, employees or distributors be liable for any indirect, specific, incidental or consequential damages (including damages
for loss of business profits and business information, business interruption or any other pecuniary loss) arising out of the use of this manual or product,
even if MikroElektronika has been advised of the possibility of such damages. MikroElektronika reserves the right to change information contained in this
manual at any time without prior notice, if necessary.

HIGH RISK ACTIVITIES

The products of MikroElektronika are not fault – tolerant nor designed, manufactured or intended for use or resale as on – line control equipment
in hazardous environments requiring fail – safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication
systems, air traffic control, direct life support machines or weapons systems in which the failure of Software could lead directly to death, personal
injury or severe physical or environmental damage (‘High Risk Activities’). MikroElektronika and its suppliers specifically disclaim any expressed or
implied warranty of fitness for High Risk Activities.

TRADEMARKS

The MikroElektronika name and logo, mikroC™, mikroBasic™, mikroPascal™, Visual TFT™, Visual GLCD™, mikroProg™, Ready™, MINI™, mikroBUS™, EasyPIC™, EasyAVR™,
Easy8051™, click™ boards and mikromedia™ are trademarks of MikroElektronika. All other trademarks mentioned herein are property of their respective companies.
All other product and corporate names appearing in this manual may or may not be registered trademarks or copyrights of their respective companies, and
are only used for identification or explanation and to the owners’ benefit, with no intent to infringe.

Copyright © 2014 MikroElektronika. All Rights Reserved.

Page 25
If you want to learn more about our products, please visit our web site at www.mikroe.com
If you are experiencing some problems with any of our products or just need additional
information, please place your ticket at www.mikroe.com/support
If you have any questions, comments or business proposals,
STM32 M4 clicker manual
do not hesitate to contact us at office@mikroe.com ver. 1.00

0 100000 027011

You might also like