A compact starter kit with your favorite microcontroller and two mikroBUS™ sockets
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.
Table of contents Introduction to clicker 2 for STM32 4 3.2 Programming with mikroProg™ programmer 15 Key features 5 mikroProg Suite for ARM software 16 1. Power supply 7 3.3 Programming with ST-LINK V2 programmer 17 2. STM32F407VGT6 microcontroller 9 4. Buttons and LEDs 19 Key microcontroller features 9 5. Power management and battery charger 21 ™ ® 3. Programming the microcontroller 10 6. Oscillators 22 3.1 Programming with mikroBootloader 11 7.
Introduction to clicker 2 for STM32 clicker 2 for STM32 is a compact dev. kit with two mikroBUS™ sockets for click board connectivity. You can use it to quickly build your own gadgets with unique functionalities and features. It carries the STM32F407VGT6, a 32-bit ARM® Cortex®-M4 microcontroller, two indication LEDs, two general purpose buttons, a reset button, an on/off switch, a li-polymer battery connector, a USB Mini-B connector and two mikroBUS™ socket.
Key features 1 12 2 13 1 ON/OFF switch 2 Pads for connecting external ON/OFF switch 3 3 Jumper for enabling RTC power supply 4 4 25 MHz crystal oscillator 5 32.
3V3 VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V C35 C36 C37 C38 C40 C39 100nF 100nF 100nF 100nF 100nF 10uF 10uF C4 2.2uF R7 VCC-3.3V VCC-3.3V 100K VSYS VSYS VCC-USB L1 3.3uH PC6-FAULT R20 C22 10K 22uF BAT EN4 VOUT VBUS VBUS SW FAULT# VCC-3.3V R23 2K94 LTC3586 C19 C20 2.2uF 2.2uF VCC-3.3V L2 LDO3V3 R19 324K C23 C31 C32 22uF 10uF VSYS VCC-5V VCC-5V R27 16K9 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 C21 33pF 10pF R21 R26 88K7 VCC-3.
1. Power supply USB power supply You can supply power to the board with a Mini-B USB cable provided in the package. On-board voltage regulators provide the appropriate voltage levels to each component on the board. Power LED (GREEN) will indicate the presence of power supply. Figure 1-1: Connecting USB power supply Battery power supply You can also power the board using a Li-Polymer battery, via on-board battery connector.
LDO3V3 LDO3V3 LD4B RED R15 PD4-BATSTAT C14 22uF 10K C15 1uF VSYS PC6-FAULT R20 C22 10K 22uF VCC-3.3V R23 2K94 LTC3586 19 18 17 16 15 14 13 2 VCC-USB PWR-EN C18 C20 2.2uF LDO3V3 C31 C32 22uF 10uF L2 C1 100nF R11 PB12-SENSEL 1K DMP2305U R12 100K R13 100K C13 100nF R14 100K PC5-VSENSE C2 2.2uF VSYS HDR1 HDR2 VCC-BAT R19 324K VCC-5V VCC-5V AN VCC-3.3V VCC-3.3V 2.2uH PWM CN1 BATT CONN C21 33pF INT 10pF R21 R27 16K9 R10 1M R17 1M PWR-EN VCC-3.
2. STM32F407VGT6 microcontroller JTAG & SW EXT. MEM. CO NTR ETH.
3.
3.1 Programming with mikroBootloader You can program the microcontroller with a 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: step 1 – Connecting clicker 2 for STM32 www.mikroe.com/downloads/get/2153/ mikrobootloader_usb_hid_STM32F407VGT6.zip 01 After the mikroBootloader software is downloaded, unzip it to desired location and start it.
step 2 – Browsing for .HEX file step 3 – Selecting .HEX file 01 01 02 Figure 3-3: Browse for HEX Figure 3-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.
step 4 – Uploading .HEX file 01 01 Figure 3-5: Begin uploading Figure 3-6: Progress bar 01 To start .HEX file bootloading click the Begin uploading button. 01 Progress bar enables you to monitor .HEX file uploading.
step 5 – Finish upload 01 Figure 3-7: Restarting MCU Figure 3-8: mikroBootloader ready for next job 01 Click OK button after the uploading process is finished. 02 Press Reset button on clicker 2 for STM32 board and wait for 5 seconds. Your program will run automatically.
3.2 Programming with mikroProg™ programmer 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 CN3 connector pads, Figure 3-9. mikroProg™ is a fast USB 2.0 programmer with hardware debugger support. It supports STM32 M3 and M4 devices from STMicroelectronics.
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.
3.3 Programming with ST-LINK V2 programmer The microcontroller can also be programmed with the ST-LINK V2 programmer and mikroProg Suite™ In order to adjust the ST-LINK™ V2 programmer to be connected to the development system, it is necessary to provide the appropriate adapter such as the mikroProg to ST-LINK V2 adapter. 2x5 headers should be first soldered on the CN3 connector pads.
VCC-3.3V VCC-3.3V C9 C10 100nF 100nF C4 2.2uF VCC-3.3V R7 AVCC 100K VCC-3.3V VCC-3.3V C35 C36 100nF 100nF VCC-3.3V VCC-3.3V C37 C38 100nF 100nF VCC-3.3V VCC-3.3V C40 C39 10uF 10uF 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 100nF U1 TMS C7 2.
4. Buttons and LEDs The board also contains a 01 reset button and a pair of 02 buttons and 03 LEDs, as well as an ON/OFF switch. The Reset button is used to manually reset the microcontroller—it generates a low voltage level on the microcontroller’s reset pin. LEDs can be used for visual indication of the logic state on two pins (PE12 and PE15). An active LED indicates that a logic high (1) is present on the pin.
C4 2.2uF R7 VCC-3.3V VCC-3.3V 100K R4 RESET# 3V3 C35 C36 100nF 100nF VCC-3.3V VCC-3.3V C37 C38 100nF 100nF PA10-T3 VCC-3.3V VCC-3.3V C40 C39 10uF 10uF C7 2.
5. Power management and battery charger clicker 2 for STM32 features LTC®3586-2, a highly integrated power management and battery charger IC that includes a current limited switching PowerPath manager. When you solder the onboard zero-ohm J1 jumper to the LDO position (Figure 6-1), the LTC®3586-2 will provide an independent, steady power supply to the MCUs RTC from the li-polymer battery or USB, even when the rest of the system is turned off (or reset).
6. Oscillators The STM32F407VGT6 microcontroller is equipped with an internal 16MHz RC oscillator that provides a stable clock signal. Since the chips have an integrated PLL, this base frequency is suitable for further clock multiplication. Board also contains an additional 25MHz crystal oscillator, as well as a 32.768kHz one, which provides an external clock for the internal RTCC module. Figure 6-2: 25MHz crystal oscillator module (X1) Figure 6-1: 32.
C4 2.2uF VCC-3.3V R7 VCC-3.3V AVCC 100K C9 C10 100nF 100nF 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 VCC-3.3V 3V3 C11 C12 100nF 100nF VCC-3.3V VCC-3.3V C35 C36 100nF 100nF VCC-3.3V VCC-3.3V C37 C38 100nF 100nF C7 2.2uF VCC-3.
7. USB connection STM32F407VGT6 microcontrollers has an integrated USB module, which enables you to implement USB communication functionality to your clicker 2 board. Connection with target USB host is done over a Mini-B USB connector which is positioned next to the battery connector.
C4 2.2uF VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V R7 AVCC VCC-3.3V VCC-3.3V C10 C11 C12 C35 C36 100nF 100nF 100nF 100nF 100nF 100nF 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 100K 3V3 C9 R29 R30 C7 2.
VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V C10 C11 C12 C35 C36 C37 C38 C40 C39 100nF 100nF 100nF 100nF 100nF 100nF 100nF 100nF 10uF 10uF C4 2.2uF R7 3V3 PC4-AN PA7-PWM PA6-PWM PA5-PWM PA4-AN VCC-3.3V C9 PB1-AN PB0-PWM VCC-3.3V PB11-I2C2_SDA PB10-I2C2_SCL 8. Pads VCC-3.
9. Pinout Reset pin Reference Ground PWM lines Digital I/O lines RX TX SCL I2C2 Lines SDA 3.3V power supply Reference Ground UART4 Lines RST GND VSYS GND PC0 PC1 PC2 PC3 PB1 PA4 PC4 PD3 PD1 PD2 PD0 PC8 PD15 PD14 PD13 PB7 PC7 PD11 PD10 PB13 PB14 PB15 3.3V GND PB9 PB8 PE5 PB0 PA5 PA6 PA7 PE1 PE2 PE3 PE4 PE6 PB6 PB5 PD7 PC13 PA1 PA0 PB10 PB11 3.3V GND Pin functions Digital lines System power supply Reference Ground Analog Lines Interrupt Lines Digital I/O lines SCK SDI SPI2 Lines SDO 3.
9.1 mikroBUS™ pinouts Having two mikroBUS™ sockets and an additional connection pad, clicker 2 for STM32 utilizes all of the STM32F407VGT6’s I/Os. Each of the three UART outputs has its own separate connection pin (either on mikroBUS™ 1 or 2, or on the 2x26 connection pad). Of the two SPI lines, one is routed to mikroBUS™ 1; the other is shared between mikroBUS™ 2 and the pins on the connection pad. Same goes for the two available I2C lines.
10. 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.
RFid click™ Relay click™ 8x8 click™ BarGraph click™ 7seg click™ THERMO click™ FM click™ Gyro click™ Page 30 Bluetooth2 click™ Thunder click™ USB SPI click™ EEPROM click™ LightHz click™ Pressure click™
11.
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.
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, do not hesitate to contact us at office@mikroe.com clicker 2 for STM32 manual ver. 1.