Download User Manual
Transcript
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. Page 2 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. USB connection 24 step 1 – Connecting clicker 2 for STM32 11 8. Pads 26 step 2 – Browsing for .HEX file 12 9. Pinout step 3 – Selecting .HEX file 12 9.1 mikroBUS pinout 28 step 4 – Uploading .HEX file 13 10. click™ boards are plug and play! 29 step 5 – Finish upload 14 11. Dimensions 31 27 ™ Page 3 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. A JTAG connector and a 2x26 pinout for interfacing with external electronics are also provided. 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. Clicker 2 for STM32 board can be powered over a USB cable. Page 4 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.768 KHz crystal oscillator 14 5 6 2x26 connection pads 7 mikroBUS™ sockets 1 and 2 8 Pushbuttons 6 6 7 7 8 8 9 9 10 15 11 16 9 Additional LEDs 10 LTC3586 USB power manager IC 11 Indication LEDs 12 RESET button 13 USB mini-B connector 14 STM32F407VGT6 15 Battery connector 16 JTAG programmer connector Page 5 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.3V VCC-3.3V 2.2uH 15K L3 2.2uH VCC-USB PWR-EN C18 100nF PWR-EN VCC-5V C25 100nF VCC-USB SWCD3 EN3 VOUT3 VOUT3 VIN3 VIN3 SWAB3 19 18 17 16 15 14 13 ILIM0 ILIM1 LDO3V3 CLPROG NTC VOUT4 VOUT4 SW4 MODE FB4 FB3 VC3 VSYS U2 1 2 3 4 5 6 7 8 9 10 11 12 PWR-EN 32 33 34 35 36 37 38 GATE CHRG# PROG FB1 VIN1 SW1 SW2 VIN2 FB2 VIN4 EN1 EN2 31 30 29 28 27 26 25 24 23 22 21 20 DMP2305U VCC-BAT 2 1 3K3 U1 3 R18 M2 VCC-5V C24 R22 105K VCC-5V VCC-5V C29 C30 C27 C28 22uF 1uF 10nF R17 1M PB12-SENSEL PB13-SPI2_SCK R9 PB14-SPI2_MISO PB15-SPI2_MOSI R28 PD8-UART3_TX PD9-UART3_RX PD10-GPIO PD11-GPIO PD12-MB2-PWM PD13-GPIO PD14-GPIO PD15-GPIO PC6-FAULT PC7-GPIO PC8-GPIO PC9-I2C3_SDA PA8-I2C3_SCL USB-DET PA10-T3 USB-D_N R29 USB-D_P R30 TMS C7 2.2uF 300pF 10pF PA2-MB1_AN PE7-MB1_RST PE8-MB1_CS PC10-SPI3_SCK PC11-SPI3_MISO PC12-SPI3_MOSI VCC-3.3V 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 PC3-AN PC2-AN PC1-AN PC0-AN RESET# OSC_OUT OSC_IN C5 22pF X1 VCC-3.3V C6 22pF 1 PE9-MB1-PWM PE10-MB1_INT PD6-UART2_RX PD5-UART2_TX PA8-I2C3_SCL PC9-I2C3_SDA PWM INT RX TX SCL SDA 5V GND VSYS VCC-5V AVCC PA3-MB2_AN PE13-MB2_RST PE11-MB2_CS PB13-SPI2_SCK PB14-SPI2_MISO PB15-SPI2_MOSI AN RST CS SCK MISO MOSI 3.3V GND HDR1 C1 100nF OSC32_OUT OSC32_IN C2 2.2uF X2 PE6-GPIO PE5-PWM PE4-GPIO PE3-GPIO PE2-GPIO 32.768KHz C33 10pF VCC-3.3 VCC-3.3V RESET# R4 R3 10K 1 3 5 7 9 RST 220 PC13-GPIO 2 PD12-MB2-PWM PE14-MB2_INT PD9-UART3_RX PD8-UART3_TX PB10-I2C2_SCL PB11-I2C2_SDA PWM INT RX TX SCL SDA 5V GND VCC-3.3V FP1 25MHz T1 TRST C3 100nF CN3 2 4 6 8 10 TMS TCK TDO TDI RESET# PC0-AN PC1-AN PC2-AN PC3-AN PB1-AN PA4-AN PC4-AN PD3-INT PD1-INT PD2-INT PD0-INT PC8-GPIO PD15-GPIO PD14-GPIO PD13-GPIO PB7-GPIO PC7-GPIO PD11-GPIO PD10-GPIO PB13-SPI2_SCK PB14-SPI2_MISO PB15-SPI2_MOSI PWM INT VCC-BAT 2K2 VCC-BAT R33 100K R5 10K clicker 2 for STM32 schematic VCC-3.3V R11 1K VCC-USB 2K2 VCC-3.3V T3 USB-DET USB-D_N USB-D_P R6 10K R24 100 FP2 FERRITE R25 1M C26 10nF VCC-3.3V M1 R10 1M R2 T2 RX TX SCL SDA SCK SDI SDO CN2 1 2 3 4 5 VBUS DD+ ID GND USB MINIB DMP2305U R12 100K R13 100K C13 100nF R14 100K PC5-VSENSE RESET# PB9-PWM PB8-PWM PE5-PWM PB0-PWM PA5-PWM PA6-PWM PA7-PWM PE1-GPIO PE2-GPIO PE3-GPIO PE4-GPIO PE6-GPIO PB6-GPIO PB5-GPIO PD7-GPIO PC13-GPIO PA1-UART4_RX PA0-UART4_TX PB10-I2C2_SCL PB11-I2C2_SDA AN VCC-3.3V PB12-SENSEL R1 3V3 HDR2 JTAG C34 10pF VCC-3.3V LDO3V3 Page 6 AN RST CS SCK MISO MOSI 3.3V GND PA2-MB1_AN PA1-UART4_RX PA0-UART4_TX J1 LD3 R8 470 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 PE12-LD1 C17 1uF VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 C16 10nF PB8-PWM PB9-PWM PE0-T2 PE1-GPIO 10K C15 1uF PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD C14 22uF 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 2K2 PD4-BATSTAT SW1 LDO3V3 JS202011AQN VCC-3.3V VCC-3.3V VCC-3.3V LDO3V3 R16 PD1-INT PD2-INT PD3-INT PD4-BATSTAT PD5-UART2_TX PD6-UART2_RX PD7-GPIO TDO TRST PB5-GPIO PB6-GPIO PB7-GPIO LDO3V3 LD4B RED R15 TCK TDI PC10-SPI3_SCK R31 PC11-SPI3_MISO PC12-SPI3_MOSI R32 PD0-INT LDO3V3 VCC-5V AVCC PE15-LD2 VCC-3.3V C12 100nF PA10-T3 VCC-3.3V C11 100nF PE0-T2 VCC-3.3V C10 100nF PA3-MB2_AN VCC-3.3V C9 PB1-AN PB0-PWM PC5-VSENSE PC4-AN PA7-PWM PA6-PWM PA5-PWM PA4-AN VCC-3.3V CN1 BATT CONN PB11-I2C2_SDA PB10-I2C2_SCL PE15-LD2 PE14-MB2_INT PE13-MB2_RST PE12-LD1 PE11-MB2_CS PE10-MB1_INT PE9-MB1-PWM PE8-MB1_CS PE7-MB1_RST VCC-BAT 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. On-board battery charger circuit enables you to charge the battery over USB connection. LED diode (RED) will indicate when battery is charging. Charging current is ~300mA and charging voltage is 4.2V DC. Figure 1-2: Connecting Li-Polymer battery Page 7 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.3V C23 R26 88K7 100nF VCC-3.3V FP1 VCC-BAT M1 VSYS 2.2uF 15K L3 2.2uH AVCC VCC-BAT 3 C19 VCC-5V C25 100nF VCC-USB SWCD3 EN3 VOUT3 VOUT3 VIN3 VIN3 SWAB3 ILIM0 ILIM1 LDO3V3 CLPROG NTC VOUT4 VOUT4 SW4 MODE FB4 FB3 VC3 3.3uH BAT EN4 VOUT VBUS VBUS SW FAULT# 1 2 3 4 5 6 7 8 9 10 11 12 VCC-USB L1 32 33 34 35 36 37 38 U2 LTC3586 GATE CHRG# PROG FB1 VIN1 SW1 SW2 VIN2 FB2 VIN4 EN1 EN2 31 30 29 28 27 26 25 24 23 22 21 20 DMP2305U VSYS C17 1uF 1 3K3 PWR-EN C16 10nF R18 M2 VCC-BAT SW1 LDO3V3 JS202011AQN VCC-3.3V VCC-3.3V VCC-3.3V LDO3V3 R16 2K2 VCC-5V C24 R22 105K 300pF VCC-5V VCC-USB VCC-5V C29 C30 C27 C28 10pF 22uF 1uF 10nF VCC-3.3V FP2 FERRITE LD3 R8 470 C26 10nF VSYS Figure 1-3: Power supply schematic Page 8 CN2 1 2 3 4 5 VBUS DD+ ID GND USB MINIB VCC-3.3V SCK SDI SDO RX TX SCL SDA VCC-3.3V 2. STM32F407VGT6 microcontroller JTAG & SW EXT. MEM. CO NTR ETH. MAC 10 /100 FLASH 1MB DMA 2 SRAM 176 KB DMA 1 AHB BUS - - 1 MB of Flash memory 3 x TIMER 16 -bit 1 x USART - 192 +4 KB SRAM 1 x SPI - 3x 12-bit ADC - Internal Oscillator 25MHz, 32kHz, PLL; - SPI, I2C, CAN, USB, USART, UART, RTC, Ethernet temperature sensor 3 x ADC Page 9 z 3 x TIM/PW M 16-bit APB2 84MH - 32-bit ARM® Cortex®-M4 architecture ARM SDIO/MMC - 16-bit and 32-bit Timers, up to 168Mhz MATRIX Cortex™-M 4 STM32F407 VGT6 POWER / RE SET WWDG 3 x TIMER 16 -bit 2 x DAC USB OTG HS IWDG RTC z Key microcontroller features USB OTG FS SRAM 16KB GPIO PORT (A,B,C,D,E,F,G ,H,I) RNG CAM. INTERF ACE APB1 42MH The clicker 2 for STM32 development tool comes with the STM32F407VGT6 device. This 32-bit high performance microcontroller is rich with on-chip peripherals and features 1 MB of Flash and 192+4 KB of SRAM. It has integrated full speed USB 2.0. support. 2 x TIMER 32 -bit 5 x TIMER 16 -bit 2 x USART 2 x UART 2 x SPI 3 x I2C 2 x CAN 3. Programming the microcontroller Figure 3-1: STM32F407VGT6 microcontroller The microcontroller can be programmed in three ways: 01 Using USB HID mikroBootloader, 02 Using external mikroProg™ for STM32 programmer 03 Using external ST-LINK V2™ programmer Page 10 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. clicker 2 for STM32 Bootloader WinRAR ZIP archive clicker 2 for STM32 Bootloader File folder Software File folder mikroBootloader USB HID.exe Bootloader tool for mikroElektron... mikroElektronika Firmware File folder clicker 2 STM32 STM32F407VG USB HID Bootloader v1.310.hex HEX File Figure 3-2: USB HID mikroBootloader window 01 To start, connect the USB cable, or if already connected press the Reset button on your clicker 2 for STM32. Click the Connect button within 5s to enter the bootloader mode, otherwise existing microcontroller program will execute. Page 11 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. Page 12 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. Page 13 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. Page 14 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. Outstanding performance, easy operation and elegant design are its key features. Figure 3-9: mikroProg™ connector Page 15 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. 04 Click the Erase button to clear the microcontroller memory. Page 16 Figure 3-10: mikroProg Suite™ for ARM® window 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. Then you should plug the adapter into the ST-LINK V2 programmer (2x10 header), and plug an IDC10 flat cable in headers, Figure 3-12. for ARM® software. This programmer connects with the clicker 2 board via mikroProg to ST-LINK V2 adapter (Figure 3-11). Figure 3-11: mikroProg™ to ST-LINK™ V2 adaper Figure 3-12: Connecting ST-LINK™ V2 programmer Page 17 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.2uF 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 C12 100nF PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 RESET# OSC_OUT OSC_IN CN3 2 4 6 8 10 TMS TCK TDO TDI RESET# JTAG R33 100K TRST Figure 3-13: mikroProg™ connection schematic Page 18 C6 22pF 25MHz X2 32.768KHz C33 10pF VCC-3.3V 3V3 LDO3V3 1 3 5 7 9 C5 22pF X1 OSC32_OUT OSC32_IN J1 VCC-3.3 TDO TRST the programming connector, you have to solder the provided 2x5 male header to the JTAG (CN3) pads. C11 TCK TDI NOTE Before attaching 3V3 PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD VCC-3.3V C34 10pF 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. Pressing any of the two buttons can change the logic state of the microcontroller pins (PE0 and PA10) from logic high (1) to logic low (0). In addition to the onboard ON/OFF switch, two pads (EXT and PSW) allow you to connect your own external switch. 03 Figure 4-1: Two LEDs, two buttons and a reset button Page 19 02 01 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.2uF 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 C5 22pF X1 RESET# OSC_OUT OSC_IN C3 25MHz X2 32.768KHz C33 10pF C34 10pF VCC-3.3V R1 3V3 R2 2K2 J1 LDO3V3 2K2 VCC-3.3V T2 R33 100K Figure 4-2: Other modules connection schematic Page 20 C6 22pF OSC32_OUT OSC32_IN R5 10K PE0-T2 VCC-3.3V PE12-LD1 VCC-3.3V T1 100nF PE0-T2 100nF 220 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 RST U1 VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 C12 PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD C11 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 VCC-3.3V R3 10K AVCC VCC-3.3V T3 R6 10K PE15-LD2 100nF PA10-T3 C10 100nF PE12-LD1 VCC-3.3V C9 PE15-LD2 VCC-3.3V 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). LTC®3586 also enables battery charging over a USB connection. Figure 5-2: power management and battery charger IC Page 21 Figure 5-1: zero-ohm J1 jumper 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.768 kHz crystal oscillator module (X2) Page 22 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.3V C40 C39 10uF 10uF PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 VCC-3.3V 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD VCC-3.3V VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 U1 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 C5 22pF X1 OSC_OUT OSC_IN 25MHz OSC32_OUT OSC32_IN X2 32.768KHz C33 10pF VCC-3.3V 3V3 J1 LDO3V3 R33 100K NOTE The use of crystal in all other schematics is implied even if it is purposely left out, because of the schematics clarity. Page 23 C6 22pF Figure 6-3: Crystal oscillator schematic C34 10pF 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. Figure 7-1: Connecting USB cable to clicker 2 Page 24 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.2uF PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD USB-D_N USB-D_P PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 USB-DET VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 U1 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 VCC-3.3V VCC-3.3V VCC-3.3V VCC-3.3V 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 C5 22pF X1 OSC_OUT OSC_IN C37 C38 C40 C39 100nF 100nF 10uF 10uF C6 22pF 25MHz OSC32_OUT OSC32_IN X2 32.768KHz C33 10pF C34 10pF VCC-USB VCC-3.3V 3V3 USB-DET USB-D_N USB-D_P R24 100 FP2 FERRITE J1A LDO3V3 R33 100K Figure 7-2: USB module connection schematic Page 25 R25 1M C26 10nF CN2 1 2 3 4 5 VBUS DD+ ID GND USB MINIB 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.3V AVCC 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 VSYS U1 PD10-GPIO PD11-GPIO INT PD13-GPIO PD14-GPIO PD15-GPIO PC7-GPIO PC8-GPIO SCK SDI SDO PB12 PB13 PB14 PB15 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PC6 PC7 PC8 PC9 PA8 PA9 PA10 PA11 PA12 PA13 VCAP GND VDD PA2 PA1 PA0-WKUP VDDA VREF+ GNDA VDD PC3 PC2 PC1 PC0 NRST OSC_OUT OSC_IN VDD GND PC15/OSC32_OUT PC14/OSC32_IN PC13/TAMPER_RTC VBAT PE6 PE5 PE4 PE3 PE2 100pin TQFP STM32F407VGT6 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 C7 2.2uF 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0 PB8 PB9 PE0 PE1 PDR_ON(RFU) VDD VCC-3.3V AN PB13-SPI2_SCK R9 PB14-SPI2_MISO PB15-SPI2_MOSI R28 VDD VCAP PB11 PB10 PE15 PE14 PE13 PE12 PE11 PE10 PE9 PE8 PE7 PB2 PB1 PB0 PC5 PC4 PA7 PA6 PA5 PA4 VDD GND PA3 HDR1 PC0-AN PC1-AN PC2-AN PC3-AN PB1-AN PA4-AN PC4-AN PD3-INT PD1-INT PD2-INT PD0-INT PC8-GPIO PD15-GPIO PD14-GPIO PD13-GPIO PB7-GPIO PC7-GPIO PD11-GPIO PD10-GPIO PB13-SPI2_SCK PB14-SPI2_MISO PB15-SPI2_MOSI HDR2 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 PA1-UART4_RX PA0-UART4_TX PWM PC3-AN PC2-AN PC1-AN PC0-AN RESET# OSC_OUT OSC_IN C5 22pF X1 C6 22pF 25MHz OSC32_OUT OSC32_IN PC13-GPIO X2 PE6-GPIO PE5-PWM PE4-GPIO PE3-GPIO PE2-GPIO 32.768KHz C33 10pF C34 10pF RX TX SCL SDA RESET# PB9-PWM PB8-PWM PE5-PWM PB0-PWM PA5-PWM PA6-PWM PA7-PWM PE1-GPIO PE2-GPIO PE3-GPIO PE4-GPIO PE6-GPIO PB6-GPIO PB5-GPIO PD7-GPIO PC13-GPIO PA1-UART4_RX PA0-UART4_TX PB10-I2C2_SCL PB11-I2C2_SDA VCC-3.3V VCC-3.3V 3V3 J1 LDO3V3 Pads HDR2 PE1-GPIO PB8-PWM PB9-PWM PD7-GPIO PB5-GPIO PB6-GPIO PB7-GPIO PD0-INT PD1-INT PD2-INT PD3-INT R33 100K Figure 8-1: Connecting pads schematic Pads HDR1 Most microcontroller pins are available for further connectivity via two 1x26 rows of connection pads on both sides of the clicker 2 for STM32 board. They are designed to match additional shields, such as Battery Boost shield, Gaming, PROTO shield and others. Page 26 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.3V power supply Reference Ground Pin functions Analog Lines Interrupt Lines SPI Lines Page 27 I2C Lines UART lines PWM lines 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. SPI3 Lines Figure 9-1: mikroBUS™ individual and shared lines SPI2 Lines SCK MISO MOSI SCK MISO MOSI PC10 PC11 PC12 PD6 PD5 PA8 PC9 PB13 PB14 PB15 PD9 PD8 PB10 PB11 Page 28 RX TX UART2 Lines SCL I2C3 Lines SDA RX TX UART3 Lines SCL I2C2 Lines SDA 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.com/click Figure 10-1: clicker 2 for STM32 driving click™ boards Page 29 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. Dimensions Page 31 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 32 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 [email protected] clicker 2 for STM32 manual ver. 1.00 0 100000 027103