mikromedia+ for STM32 ARM® Amazingly compact, all-on-single-pcb development board carring 4.
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 STM32, ARM® and Windows® logos and product names are trademarks of STMicroelectronics®, ARM® Holdings and Microsoft® in the U.S.A. and other countries.
Table of Contents Introduction to mikromedia+ for STM32 ARM® 4 4. RTC Battery and Reset Button 18 4 5. Crystal oscillator and 2.048V reference 20 Package Contains 5 6. MicroSD Card Slot 22 1. Power supply 6 7. Touch Screen 24 2. STM32F407ZG microcontroller 8 8. Audio Module 26 Key microcontroller features 8 9. USB DEVICE connection 28 3. Programming the microcontroller 9 10. USB HOST connection 30 11.
Introduction to mikromedia+ for STM32 ARM® System Specification The mikromedia+ for STM32 ARM® is a compact development system with lots of on-board peripherals which allow development of devices with multimedia contents. The central part of the system is a 32-bit ARM® Cortex™-M4 STM32F407ZG power supply Via USB cable (5V DC) or via screw 144-pin microcontroller. The mikromedia+ for STM32 ARM® features integrated modules such as stereo MP3 codec, 4.
Package Contains 01 Damage resistant protective box 04 mikromedia+ for STM32 ARM® user’s guide 02 mikromedia+ for STM32 ARM® development system 05 mikromedia+ for STM32 ARM® schematic Page 5 03 Two 1x26 male headers and one 2x5 header 06 USB cable and microSD card
1. Power supply Figure 1-1: USB power supply Figure 1-2: Battery power supply Figure 1-3: Screw terminals power supply The mikromedia+ for STM32 ARM® board can be powered in three different ways: via USB connector using MINI-B USB cable provided with the board (CN4), via battery connector using Li-Polymer battery (CN5) or via screw terminals using laboratory power supply (CN3). After you plug in the appropriate power supply turn the power switch ON (SW1).
VCC-3.3V IN OUT 2 1 TPS2041B Vdc VIN PWR-EN R1 CN3 R42 D2 B340A 10K L1 L2 10 VIN VOUT 9 EN PGND FB 8 PS GND 7 PG VAUX 6 R41 100K TPS63060 C69 22uF R43 1K R45 10K D4 C66 C70 22uF C67 22uF C68 22uF C139 C72 1uF 100nF 10nF C141 100pF 10pF R101 100K 1.5uH VCC-3.3V U9 Vbat_IN R49 1M CN5 R51 1M M2 DMP2160UW 1 2 3 4 5 L1 L2 10 VIN VOUT 9 EN PGND FB 8 PS GND 7 PG VAUX 6 R50 100K TPS63060 BAT-VSENSE BAT-VSENSE R54 1M VCC-3.3V VCC-3.
2. STM32F407ZG microcontroller - 192 + 4 KB of SRAM memory; - up to 140 I/O pins; GPIO PORT (A,B,C,D,E,F,G ,H,I) 3 x TIM/PW M 16-bit 1 x USART - 4xUART, 3xSPI, 3xI2C, 2xCAN, 3xADC, 3XADC etc. - Ethernet, USB etc. 1 x SPI temperature sensor 3 x ADC Page 8 MATRIX ARM SDIO/MMC 3 x TIMER 16 -bit USB OTG FS SRAM 16KB AHB BUS - - 16/32-bit timers - 16MHz internal oscillator, 32kHz RTCC, PLL; SRAM 176 KB DMA 1 Cortex™-M 4 STM32F407 ZG POWER / RE SET WWDG 3 x TIMER 16 -bit 2 x DAC RNG CAM.
3.
Programming with mikroBootloader You can program the microcontroller with bootloader which is pre programmed into the device by default. To transfer .HEX file from a PC to MCU you need bootloader software (mikroBootloader USB HID) which can be downloaded from: http://www.mikroe.com/downloads/get/1976/ mikromedia_plus_mikrobootloader_v210.zip step 1 – Connecting mikromedia 01 02 After software is downloaded unzip it to desired location and start mikroBootloader USB HID software.
step 2 – Browsing for .HEX file step 3 – Selecting .HEX file 01 0101 02 Figure 3-3: Browse for HEX Figure 3-4: Selecting HEX 01 Click the Browse for HEX button and from a pop-up window (Figure 3.4) choose the .HEX file that will be uploaded to MCU memory. 01 Select .HEX file using open dialog window. 02 Click the Open button.
step 4 – Uploading .HEX file 01 01 Figure 3-5: Begin uploading Figure 3-6: Progress bar 01 To start .HEX file uploading click the Begin uploading button. 01 You can monitor .
step 5 – Finish upload 01 01 Figure 3-7: Restarting MCU Figure 3-8: mikroBootloader ready for next job 01 Click the OK button after uploading is finished. Board will automatically reset and after 5 seconds your new program will execute.
Programming with mikroProg™ programmer Figure 3-9: mikroProg™ JTAG 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 JTAG connector, Figure 3-9. mikroProg™ is a fast USB 2.0 programmer with hardware Debugger support. It supports ARM® Cortex™-M3 and Cortex™-M4 microcontrollers from STM32.
VCC-3.3V OSC_IN OSC_OUT R87 100K C114 2.2uF Figure 3-10: mikroProg™ JTAG connector connection schematic Page 15 100nF C118 100nF 100nF C117 100nF 100nF C121 C122 100nF 100nF C120 100nF C126 C111 22pF VCC-3.3V C134 4.7uF C110 22pF STM32F407ZG 100nF 25MHz VCC-3.3V C125 OSC_IN OSC_OUT C119 OSC32_IN OSC32_OUT VCC-3.
mikroProg Suite™ for ARM® software 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 a Product DVD: http://www.mikroe.com/downloads/get/1809/mikroprog_suite_for_arm.
Software installation wizard 01 Start Installation 02 Accept EULA and continue 03 Install for all users 04 Choose destination folder 05 Installation in progress 06 Finish installation Page 17
4. RTC Battery and Reset Button Reset Button The board is equipped with reset button, which is located on the front side of the board. If you want to reset the circuit, press the reset button. It will generate low voltage level on the microcontroller reset pin (input). A reset can also be externally provided through the pin 27 on the side headers. RTC Battery mikromedia+ for STM32 ARM® features an RTC battery holder for microcontroller RTC module.
VCC-3.3V 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 C114 Figure 4-1: Reset circuit and RTC battery schematic Page 19 2.2uF C121 100nF 100nF C120 C122 100nF 100nF C119 100nF 100nF 100nF 100nF C125 C126 VCC-3.3V C134 4.
5. Crystal oscillator and 2.048V reference The board is equipped with 01 25MHz crystal oscillator (X5) circuit that provides external clock waveform to the microcontroller OSCO and OSCI pins. This base frequency is suitable for further clock multipliers and ideal for generation of necessary USB clock, which ensures proper operation of bootloader and your custom USBbased applications. The board also contains 02 32.
VCC-3.3V C111 22pF 100nF C118 100nF 100nF C117 C121 100nF 100nF C120 C122 100nF 100nF C119 100nF 100nF 100nF C125 C126 VDD PDR_ON PE1 PE0 PB9 PB8 BOOT0 PB7 PB6 PB5 PB4 PB3 PG15 VDD VSS PG14 PG13 PG12 PG11 PG10 PG9 PD7 PD6 VDD VSS PD5 PD4 PD3 PD2 PD1 PD0 PC12 PC11 PC10 PA15 PA14 VCC-3.3V 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 C113 10nF C112 1uF VCC-3.
6. microSD Card Slot 01 02 Board contains 01 microSD card slot for using 02 microSD cards in your projects. It enables you to store large amounts of data externally, thus saving microcontroller memory. microSD cards use Serial Peripheral Interface (SPI) for communication with the microcontroller. Ferrite and capcitor are provided to compensate the voltage and current glitch that can occur when pushing-in and pushingout microSD card into the socket.
SD-CLK SD-DAT3 SD-DAT2 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 C107 2.2uF R87 100K 100nF 100nF 100nF C117 100nF C122 100nF C121 100nF 100nF C126 VCC-3.3V 2.2uF Figure 6-2: microSD Card Slot module connection schematic C134 4.7uF VCC-3.3V C114 Page 23 C118 100nF C115 C116 100nF C106 100nF 100nF C152 22uF C120 FERRITE C119 VCC-MMC FP3 C125 C111 22pF VCC-3.3V VCC-3.
7. Touch Screen The development system features a 4.3‘‘ TFT 480x272 display covered with a resistive touch panel. Together they form a functional unit called a touch screen, Figure 7-1. It enables data to be entered and displayed at the same time. The TFT display is capable of showing graphics in 256K different colors.
TFT-TE I2C1_SDA I2C1_SCL TFT-D11 TFT-D12 TFT-D13 TFT-D14 TFT-D15 TFT-D5 TFT-D6 TFT-D7 TFT-D8 TFT-D9 TFT-D10 AT043B35-15I-10 VCC-3.3V Vbat_mcu VCC-3.3V R7 10K TFT-CS# TFT-D/C# TFT-RD# TFT-WR# TFT-RST# TFT1 VCC-1.
8. Audio Module Figure 8-1: On-board VS1053 MP3 codec 03 01 02 mikromedia+ for STM32 ARM® features stereo audio codec 01 VS1053. This module enables audio reproduction and sound recording by using 02 stereo headphones with microphone connected to the system via a 03 3.5mm connector CN2. All functions of this module are controlled by the microcontroller over Serial Peripheral Interface (SPI). IN and OUT channels are also provided on side headers.
E2 470 C56 100nF 10uF C60 100nF C61 100nF C57 100nF C62 100nF C132 100nF C63 100nF C58 100nF C64 100nF C65 100nF R14 100K E3 R15 E5 LINE-OUT_L C42 10uF 3.3nF VCC-1.8V 470 LINE-OUT_R C43 10uF 3.3nF R16 100K VCC-3.3V Vbat_mcu R86 100K BAT1 3000TR 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 R13 VCC-3.3V C107 2.2uF C59 2.
9. USB DEVICE connection 01 02 Figure 9-1: Connecting USB cable to MINI-B USB connector ARM® Cortex™-M4 STM32F407ZG microcontroller has integrated USB module, which enables you to implement USB communication functionality to your mikromedia board. Connection with target USB host is establish over 01 MINI-B USB connector. For proper insertion of the 02 MINI-B USB cable refer to Figure 9-1.
25MHz C110 22pF C111 22pF C114 2.2uF Figure 9-2: USB DEVICE module connection schematic Page 29 C117 100nF 100nF 100nF C116 C118 100nF C115 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 R87 100K C121 100nF 100nF C120 C122 100nF 100nF C119 100nF 100nF 100nF C125 C126 OSC_IN OSC_OUT VCC-3.3V 100nF OSC_IN OSC_OUT STM32F407ZG VCC-3.3V USB-D_P USB-D_N USB-ID USB-VBUS VCC-3.3V C134 4.
10. USB HOST connection 02 Figure 10-1: Connecting USB cable to MINI-B USB connector via USB adapter 01 mikromedia+ for STM32 ARM® can also be used as USB HOST which enables microcontroller to establish a connection with the target device (eg. USB keyboard, USB mouse, etc). The board provides necessary power supply to the target via TPS2041B IC. In order to enable the 01 USB HOST cable to be connected to the board, it is necessary to use the appropriate 02 MINI-B USB to USB type A adapter.
USB-VBUS_ER USB-VBUS X4 OSC32_IN OSC32_OUT 32.768KHz C108 10pF X5 C109 10pF OSC_IN OSC_OUT PA3 VSS VDD PA4 PA5 PA6 PA7 PC4 PC5 PB0 PB1 PB2 PF11 PF12 VSS VDD PF13 PF14 PF15 PG0 PG1 PE7 PE8 PE9 VSS VDD PE10 PE11 PE12 PE13 PE14 PE15 PB10 PB11 VCAP1 VDD OSC_IN OSC_OUT STM32F407ZG 25MHz C110 22pF C111 22pF R87 100K C114 Figure 10-2: USB HOST module connection schematic Page 31 2.2uF 100nF C118 100nF 100nF C117 C121 100nF 100nF C120 C122 100nF 100nF C119 100nF C126 VCC-3.3V VCC-3.
11. Accelerometer Figure 11-1: Accelerometer module On board ADXL345 accelerometer is used to measure acceleration in three axis: x, y and z. The accelerometer function is defined by the user in the program loaded into the microcontroller. Communication between the accelerometer and the microcontroller is performed via the I2C interface. There is an option to select the alternate accel address with jumper J3.
OSC_IN OSC_OUT 25MHz C110 22pF C111 22pF OSC_IN OSC_OUT STM32F407ZG R87 100K C114 Figure 11-2: Accelerometer connection schematic Page 33 2.2uF 100nF 100nF 100nF C117 C118 100nF C115 C116 C121 100nF 100nF C120 C122 100nF 100nF C119 100nF C126 VCC-3.3V C134 4.7uF X5 C109 10pF VCC-3.3V 100nF C108 10pF 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 C125 32.
12. Flash Memory Figure 12-1: Flash memory module Since multimedia applications are getting increasingly demanding, it is necessary to provide additional memory space to be used for storing more data. The flash memory module enables the microcontroller to use additional 8Mbit flash memory. It is connected to the microcontroller via the Serial Peripheral Interface (SPI).
VCC-3.3V Vbat_mcu VCC-3.3V 25MHz C110 22pF C111 22pF OSC_IN OSC_OUT R87 100K C114 SF_CS 100nF C118 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 100nF 100nF C117 100nF C115 VCC-3.3V Figure 12-2: Flash memory module connection schematic Page 35 2.2uF C121 100nF 100nF C120 C122 100nF 100nF C119 100nF 100nF 100nF C125 C126 VCC-3.3V R102 27 R29 27 SPI2_MOSI SPI2_MISO SPI2_SCK C134 4.
13. RF Transceiver Figure 13-1: RF transceiver antenna Figure 13-2: RF transceiver module mikromedia+ for STM32 ARM® board features RF transceiver chip with 2.4GHz chip antenna. It is suitable for wireless operation in the world wide ISM frequency band at 2.400 - 2.4835 GHz with air data rate up to 2Mbps. RF transceiver module is connected to the microcontroller via the Serial Peripheral Interface (SPI).
C87 10uF C88 100nF C89 100nF 100nF 100nF 100nF C117 C118 100nF 100nF C121 100nF 100nF 100nF 100nF 100nF 100nF C125 C126 FP2 FERRITE C124 VCC-RF C123 VCC-3.3V VCC-3.3V C90 100nF C82 33nF R48 10K 1 2 3 4 5 R63 10K 2.2uF RF-INT# VDD CE VSS CSN nRF24L01P ANT2 SCK ANT1 MOSI VDD_PA MISO 15 14 13 12 11 3.9nH L5 8.2nH L6 C92 X3 22pF 16MHz C91 Page 37 C83 L4 1.5pF C84 NP 2.7nH 1M R64 Figure 13-3: RF transceiver module schematic C134 4.7uF A1 Rufa_2.
14. Ethernet Eternet Transceiver transceiver Figure 14-1: Ethernet transceiver module The development system features a Ethernet transceiver module ideal for local area networking (LAN). Communication over Ethernet is based on data packets called frames. Each frame contains source and destination addresses and error-cheching data so that damaged data can be detected and re-transmitted.
LAN-TXD1 LAN-TXD0 OSC32_IN OSC32_OUT LAN-INT# C134 4.
15. Buzzer The board is also equipped with piezo buzzer. It is an electric component which can be used to create sound waves when provided with electrical signal. Microcontroller can create sound by generating a PWM signal. Frequency of the signal determines the pitch of the sound and duty cycle of the signal can be used to increase or decrease the volume.
BUZZER VCC-5V Vbat_mcu VCC-3.
16. Other modules 03 02 04 01 The board also contains additional peripherals that can be very useful, such as 01 PIN photodiode, 02 IR receiver, 03 RGB led diode and 04 analog temperature sensor. PIN photodiode is a type of photo detector capable of converting light into the voltage with high sensitivity and speed of response. It is connected to the microcontroller analog pin. IR receiver is used for infrared remote control systems.
100nF 100nF 100nF 100nF C119 C120 C121 C122 X5 C109 10pF OSC_IN OSC_OUT 25MHz C110 22pF 100nF 100nF 100nF 100nF C123 C124 C125 C126 VCC-3.3V C134 4.7uF C131 1uF 100nF VCC-3.3V C130 10nF C111 22pF VCC-3.3V U16 C127 OSC32_IN OSC32_OUT 32.768KHz C108 10pF 4 3 2 1 RC5_TX C100 4.
17. Pads 5V pwr. Ground Analog lines GPIO SPI2 lines CAN lines SPI1 lines LAN-TX LAN-RX 3.3V pwr. Ground 5V GND PA4 PB0 PB1 PC0 PC2 PC3 PE4 PC13 PB12 PB13 PB14 PB15 PD0 PD1 PA15 PA5 PA6 PB5 N P N P 3.3V GND PWM Interrupt I2C UART 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. Analog lines SPI CAN 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. RST 3.
C122 X5 OSC32_IN OSC32_OUT C134 4.
mikromedia+ for STM32 shield 07 02 04 03 01 05 05 05 08 08 05 09 07 Figure 18-1: mikromedia+ shield 06 We have prepared an extension board pin-compatible with your mikromedia+ board, which enables you to easily expand your basic board functionality. It is called mikromedia+ SHIELD for STM32 ARM®.
VCC-3.3V VCC-3.3V VCC-5V PA4/AN1 PC2 PC3 PA5/SPI-SCK PA6/SPI-MISO PB5/SPI-MOSI AN RST CS SCK MISO MOSI 3.3V GND 1 PD12/PWM1 PE0/INT1 PA3/UART1-RX PD5/UART1-TX PF1/I2C-SCL PF0/I2C-SDA PWM INT RX TX SCL SDA 5V GND PB0/AN2 PE4 PC13 PA5/SPI-SCK PA6/SPI-MISO PB5/SPI-MOSI VCC-5V PA4/AN1 PB0/AN2 PB1/AN3 PC0/AN4 PC2 PC3 PE4 PC13 PB12 PD0/CAN-RX PD1/CAN-TX PA15 PA5/SPI-SCK PA6/SPI-MISO PB5/SPI-MOSI LAN-TX_N LAN-TX_P LAN-RX_N LAN-RX_P VCC-3.3V VCC-5V AN RST CS SCK MISO MOSI 3.
What’s next? You have now completed the journey through each and every feature of mikromedia+ for STM32 ARM® board. You got to know it’s modules and organization. Now you are ready to start using your new board. We are suggesting several steps which are probably the best way to begin. We invite you to join the users of mikromedia™ brand. You will find very useful projects and tutorials and can get help from a large ecosystem of users.
Notes: Page 49
Notes: Page 50
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 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 office@mikroe.com mikromedia Plus for STM32 ARM® Manual ver. 1.