mikroprog™ for stm32® manual - mikroelektronika · page 1 mikroprog mikroprog™ is a fast usb...

24
mikroProg mikroProg is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg to support all STM32® ARM® Cortex -M3 and Cortex -M4 microcontrollers in a single programmer. for STM32 ®

Upload: buikhuong

Post on 02-Apr-2018

263 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 1

mikroProgmikroProg™ is a fast USB programmer with hardware debugger

support. Smart engineering allows mikroProg™ to support all

STM32® ARM® Cortex™-M3 and Cortex™-M4 microcontrollers

in a single programmer.

for STM32®™

Page 2: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

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.

The STM32®, ARM® and Windows® logos and product names are trademarks of STMicroelectronics®, ARM® Holdings and Microsoft® in the U.S.A. and other countries.

TO OUR VALUED CUSTOMERS

Nebojsa Matic

General Manager

Page 3: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 3

Introduction to mikroProg™ 4

Key features 5

1. Driver installation 6

step 1 – Start installation 7

step 2 – Accept EULA 7

step 3 – Installing the drivers 8

step 4 – Finish installation 8

2. Connecting to a PC 9

3. mikroProg Suite™ for ARM® software 10

4. Connecting with a target device 12

5. Connector Pinout 13

6. mikroProg™ to 20-pin JTAG connector 14

7. Connection schematics examples 16

64-pin STM32® schematic 17

100-pin STM32® schematic 18

144-pin STM32® schematic 20

176-pin STM32® schematic 21

Table of Contents

Page 4: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 4

mikroProg™ for STM32® is a fast programmer and hardware debugger. Smart engineering allows mikroProg™ to support all STM32®

ARM® Cortex™-M3 and Cortex™-M4 devices in a single programmer! Outstanding performance, easy operation, elegant design and low

price are it’s top features. It is supported in mikroElektronika, as well as in other ARM® compilers.

Introduction to mikroProg™

Page 5: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 5Page 4

01

02

03

04

05

06

Flat cable

USB MINIB connector

DATA transfer indication LED

ACTIVE indication LED

LINK indication LED

POWER indication LED

06

05

04

03

0102

- Hardware Debugging

- No need for firmware update

- New microcontrollers supported via

latest version of mikroProg Suite™ for ARM® software

Key features

What you see

Page 6: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 6

1. Driver installation

Make sure to disconnect mikroProg™ before installing drivers.

NOTE:

When you locate the

drivers, please extract the

setup file from the ZIP

archive. You should be able

to locate the driver setup

file. Double click the setup

file to begin installation of

the programmer drivers.

On-board mikroProg™ requires drivers in order to work. Drivers can be found on the link bellow:

When you download the drivers, please extract files from the ZIP archive. Folder with extracted files contains folders with drivers for

different operating systems. Depending on which operating system you use, choose adequate folder and open it.

http://www.mikroe.com/downloads/get/2053/mikroprog_suite_for_arm_drivers.zip

Page 7: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 7Page 6

step 2 – Accept EULAstep 1 – Start installation

01 In welcome screen click the Next> button 02

03

Click Change button to select new destination folder or

use the suggested installation path

Click the Next> button

01 03

02

Page 8: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 8

step 3 – Installing the drivers step 4 – Finish installation

04 Drivers are installed automatically 05 Click the Finish button to end installation process

05

04

Page 9: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 8 Page 9

After driver installation is complete, you can connect the programmer with your PC using USB

cable provided with the package. Green POWER LED should turn ON, indicating the presence of

power supply. Amber-colored LINK LED will turn ON when link between mikroProg™ for STM32®

and PC is established. Link can be established only when correct drivers are installed on your PC.

2. Connecting to a PC

Page 10: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 10

mikroProg™ for STM32® programmer requires special programming software called mikroProg Suite™

for ARM®. This software is used for programming all of STM32® ARM® Cortex™-M3 and Cortex™-M4

microcontroller families. It features intuitive interface and SingleClick™ programming technology.

Software installation is available on following link:

3. mikroProg Suite™ for ARM® software

Figure 3-1: mikroProg Suite™ for ARM® window

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

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

Page 11: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 11Page 10

01

04

02

05

03

06

Start Installation

Choose destination folder

Accept EULA and continue

Installation in progress

Install for All users or Current user

Finish installation

Software installation wizard

Page 12: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 12

4. Connecting with a target device

For connection with a target device mikroProg™ uses IDC10 JTAG connector, as shown on Figure 4-1. In order to make

proper connection with the target board it is necessary to pay attention to IDC10 connector pinout. Every pin has a

different purpose and for easy orientation IDC10 connector is marked with a little knob and incision between pins

number 9 and 7, Figure 5-1.

Figure 4-1: IDC10 JTAG connector

Page 13: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 13Page 12

Figure 5-1: Female connector pinout

01

03

05

07

09 10

08

06

04

02

01

03

05

07

09

VCC-3.3V - Power supply

GND - Ground

GND - Ground

TRST - JTAG reset

GND - Ground

5. Connector Pinout

02

04

06

08

10

TMS/SWDIO - JTAG Mode Select/SWD data I/O

TCK/SWCLK - JTAG Clock/SWD clock

TDO - JTAG Data output

TDI - JTAG Data input

#RESET - System Reset

Page 14: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 14

6. mikroProg™ to 20-pin JTAG connector

In order to connect mikroProg to 20-pin male JTAG connector it is necessary

to use appropriate adapter, such as the mikroProg™ to ST-LINK V2 adaper, Figure 6-1. This adapter should be first placed on 2x10 male connector.

Then you should plug in the mikroProg™ into 2x5 male header, Figure 6-2.

Figure 6-2: Connecting

mikroProg™ programmer

Figure 6-1: mikroProg™ to ST-LINK V2 adaper

Page 15: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 15Page 14

13579

111315

246810121416

1719

1820

TDOTCKTMS

TDIRESET#

TRST

mikroProg

1 23 45 67 89 10

HD2

HD1

ST- Link V2

TMSTCK

VCC-3.3V

RESET#

GND

GNDGND

GNDGND

GND

TRST

VCC-3.3VTDO

TDI

VCC-3.3V VCC-3.3V

Figure 6-3: mikroProg™ to ST-Link V2 adapter connection schematics

Page 16: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 16

Following examples demonstrate connections with some of the most popular supported microcontrollers. Each one

is carefully selected as a representative of the entire family. All MCUs use TMS, TCK, TDO, TDI, TRST, #RESET lines

for JTAG programming or SWDIO, SWCLK for SWD (Serial Wire Debug) programming. These lines are located on same

microcontroller pins within a family.

7. Connection schematics examples

Page 17: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 17Page 16

64

-pin

STM

32

® sch

emat

ic

Figure 7-1: Connection schematics for 64-pin STM32F10x/STM32L15x MCU via 2x5 male header

17181920212223242526272829303132

33343536373839404142434445464748

8765432

9

9 0

1112

43

43

16151413

5678

10

12

21091 55555554 5 6666655

PC3PC8

PB1

PD2

PB3

PB2

PA13PA12PA11PA10PA9PA8PC9

PB14

PB12PB13

PB15

PC7PC6

VDDGND

PB4

PC12

PC11

PC10

PA15

PA14

PB9

PB8

BOO

T0PB

7PB

6PB

5

GN

DVD

D

PC15/OSC32_OUTPC14/OSC32_IN

VBATPC13

OSC_INOSC_OUT

NRSTPC0

PC2PC1

PA2PA1PA0

VDDAGNDA

PB0

PC5

PC4

RA

7

PB11

PB10

VDD

GN

D

GN

DPA

3

VDD

PA4

PA5

PA6

STM32F10x64pin TQFP

U1

R1 100K

R2 100K

X1

25MHz

C122pF

C222pF

X2

32.768KHz

C422pF

C322pF

VCC- 3.3

TMS/SWDIOTCK/SWCLKTDOTDITRSTRESET#

VCC- 3.3

STM32L15x

Page 18: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 18

10

0-p

in S

TM3

2® s

chem

atic

30 29 28 2734 33

58575655545352

46 36 3542434445 3750

9

4849

1112

32

72

69686766656463

43

87

2423

181716151413

5678

10

9 0

12

22212019

62616059

3839404147

71

31

51

70

26

25

6

757473

1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0

X1

25MHz

C122pF

C222pF

X2

32.768KHz

C422pF

C322pF

VCC- 3.3R2 100K

R1 100K

VCC- 3.3

TMS/SWDIOTCK/SWCLKTDOTDIRESET#

TRST77 7 87

STM32F10x100pin TQFP

8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10

PE11

PE10

PE6VBAT

PC13/TAMPER_RTCPC14/OSC32_IN

PA10PA9PA8

PD9

PE13

PE12

PB13PB14PB15PD8

PE14

PE15

PB5

PB4

PB3

PB7

PD7

PD6

PE5PE4

PE1

PE0

PB9

PB8

BOO

T0

PB6

OSC_IN

PA0-WKUPVDDA

VREF+VREF-GNDA

PC3

PA12PA11

PB12

PC8

NRST

VDDGND

PE7

GN

DVD

D

PE2PE3

PA2PA1

GN

DVD

D

PC9

PD13

PB10

PB11

PD10

PE8

PB2

PD11

PD14

PD5

PC2PC1PC0

PB1

PE9

PD12

PC7OSC_OUT

PC15/OSC32_OUT

PD15PC6

PA13

PC10

PA14

NCGNDVDD

PA15

PC11

PC12

PD0

PA6

PA5

PC4

PA7

PC5

PB0

GN

DVD

D

PA3

PA4

PD1

PD2

PD3

PD4

U1

STM32L15x

Figure 7-2: Connection schematics for 100-pin STM32F10x/ STM32L15x MCU via 2x5 male header

Page 19: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 19Page 18

10

0-p

in S

TM3

2® s

chem

atic

30 29 28 2734 33

58575655545352

46 36 3542434445 3750

9

4849

1112

32

72

69686766656463

43

7877

2423

181716151413

5678

10

79 80

12

22212019

62616059

383940414771

31

51

70

26

25

76

757473

81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

X1

25MHz

C322pF

C422pF

X2

32.768KHz

C622pF

C522pF

VCC- 3.3

100pin TQFP

PE11

PE10

PE6VBAT

PC13/TAMPER_RTCPC14/OSC32_IN

PA10PA9PA8

PD9

PE13

PE12

PB13PB14PB15PD8

PE14

PE15

PB5

PB4

PB3

PB7

PD7

PD6

PE5PE4

PE1

PE0

PB9

PB8

BOO

T0

PB6

OSC_IN

PA0-WKUPVDDA

VREF+GNDA

VDDPC3

PA12PA11

PB12

PC8

NRST

VDDGND

PE7

PDR

_ON

(RFU

)VD

D

PE2PE3

PA2PA1

VCA

PVD

D

PC9

PD13

PB10

PB11

PD10

PE8

PB2

PD11

PD14

PD5

PC2PC1PC0

PB1

PE9

PD12

PC7OSC_OUT

PC15/OSC32_OUT

PD15PC6

PA13

PC10

PA14

VCAPGNDVDD

PA15

PC11

PC12

PD0

PA6

PA5

PC4

PA7

PC5

PB0

GN

DVD

D

PA3

PA4

PD1

PD2

PD3

PD4

STM32F20x

U1

R2 100K

C1 2.2uF

C22.2uF

R1 100K

VCC- 3.3

TMS/SWDIOTCK/SWCLKTDOTDIRESET#

TRST

STM32F40x

Figure 7-3: Connection schematics for 100-pin STM32F20x/STM32F40x MCU via 2x5 male header

Page 20: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 20

14

4-p

in S

TM3

2® s

chem

atic

108107106105104103102101100999897969594939291908988878685848382818079787776757473

72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 3714

414

314

214

114

013

913

813

713

613

513

413

313

213

113

012

912

812

712

612

512

412

312

212

1

117

118

119

120

116

115

114

113

112

111

110

109

30292827

3433

3635

9

1112

32

43

2423

181716151413

5678

10

12

22212019

31

2625

STM32F20x144pin TQFP

PA1PA0

VDDAVREF+

PA6

PA5

PE6VBATPC13

PC14/OSC32_IN

PB10

PE15

PE14

PG0

PC4

PA7

VDD

PF13

PF14

PF15

PC5

PB0

PG6PG5PG4

PG8

PG3PG2

VDDGND

PE5PE4

PC8PC7PC6VDDGND

PG7

PF2

PC2

OSC_INPF10PF9PF8PF7PF6

VCA

PPB

11

PE12

PF4

PF1PF0

GN

D

PC9PA8

PE2PE3

PC1PC0

NRSTOSC_OUT

PF11

PF12

PE13 PE9

PB1

PB2

PG1

VDD

PA3

PE7

GN

D

PD15

VDDGNDPF5

PA2

PA4

PE8

PE11

PD14

GNDAVDDPC3

PF3

PC15/OSC32_OUT

VDD

PE10

VDD

PD9

PB15

PB12PB13PB14

PD8

PD10PD11PD12PD13

PA9

PA11

VDDGNDVCAPPA13PA12

PA10

PG12

PG11

PG10

PG14

PG9

PD7

GN

DPD

5

PB4

PB3

PG15

VDD

GN

D

PG13

PB5

PB6

PD6

VDD

PD0

PC11

PA14

PA15

PC10

PC12

PD1

PD2

PD3

PD4

PB7

PB8

VDD

PDR

_ON

PE1

PE0

PB9

BOO

T0

GN

D

U1

X1

25MHz

C322pF

C422pF

X2

32.768KHz

C622pF

C522pF

R1 100K

VCC- 3.3

TMS/SWDIOTCK/SWCLKTDOTDIRESET#

TRST

C22.2uF

R2 100K

C1 2.2uF

VCC- 3.3

STM32F40x

Figure 7-4: Connection schematics for 144-pin STM32F20x/STM32F40x MCU via 2x5 male header

Page 21: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 21Page 20

17

6-p

in S

TM3

2® s

chem

atic

1081071061051041031021011009998979695949392919089

88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45

444342414039383736353433

132131130129128127126125124123122121

117118119120

116115114113112111110109

30292827

3433

3635

9

1112

32

43

2423

181716151413

5678

10

12

22212019

31

2625

4443424140393837

565554535251504948474645 686766656463626160595857 75747372717069 76111111111111

STM32F20x176pin TQFP

PA1PA0

VDDAVREF+

PA6

PA5

PE6VBAT

PC13PC14/OSC32_IN

PB10

PE15

PE14

PG0

PC4PA7

VDD

PF13

PF14

PF15

PC5

PB0

PG6PG5PG4

PG8

PG3PG2

VDDGND

PE5PE4

PC8PC7PC6VDDGND

PG7

PF2

PC2

OSC_INPF10PF9PF8PF7PF6

VCA

PPB

11

PE12

PF4

PF1PF0

GN

D

PC9PA8

PE2PE3

PC1PC0

NRSTOSC_OUT

PF11

PF12

PE13 PE9

PB1

PB2

PG1

VDD

PA3

PE7

GN

D

PD15

VDDGND

PF5

PA2

PA4

PE8

PE11

PD14

GNDAVDDPC3

PF3

PC15/OSC32_OUT

VDD

PE10

VDD

PD9

PB15

PB12PB13PB14

PD8

PD10PD11PD12PD13

PA9

PA11

VDDGNDVCAPPA13PA12

PA10

PG12

PG11

PG10

PG14

PG9

PD7

GN

DPD

5

PB4

PB3

PG15

VDD

GN

D

PG13

PB5

PB6

PD6

VDD

PD0

PC11

PA14

PA15

PC10

PC12

PD1

PD2

PD3

PD4

PB7

PB8

VDD

PDR

_ON

PE1

PE0

PB9

BOO

T0

GN

D

111111111111 111111111111 1111111 1

PI8

PI11PI10PI9

VDDGND

PH3PH2

PH4

PH5

PA7

PA6

PC4

PH9

PH6

PH7

PH8

PH10

PH11

PH12

VDDGND

PH13PH14PH15PI0PI1

PI3

PI2

GN

DVD

D

PI4

PI7

PI6

PI5

U1

R1 100K

R2 100K

C1 2.2uF

C22.2uF

X1

25MHz

C322pF

C422pF

X2

32.768KHz

C622pF

C522pF

VCC- 3.3

VCC- 3.3

TMS/SWDIOTCK/SWCLKTDOTDIRESET#

TRST

STM32F40x

Figure 7-5: Connection schematics for 176-pin STM32F20x/STM32F40x MCU via 2x5 male header

Page 22: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 22

Notes:

Page 23: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

Page 23Page 22

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.

TRADEMARKS

The MikroElektronika name and logo, the MikroElektronika logo, mikroC™, mikroBasic™, mikroPascal™, mikroProg™, EasyMx PRO™ 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 © MikroElektronika, 2013, All Rights Reserved.

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 hazard-ous 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.

Page 24: MikroProg™ for STM32® Manual - Mikroelektronika · Page 1 mikroProg mikroProg™ is a fast USB programmer with hardware debugger support. Smart engineering allows mikroProg™

mikroProg for STM32® Manualver. 1.00

0 100000 019504

If you want to learn more about our products, please visit our website 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,

do not hesitate to contact us at [email protected]