MikroElektronika Learn

User Manual

Mikromedia 7 for STM32F7 – User Manual

8 Dec , 2016  

Mikromedia 7 for STM32F7

mikromedia 7 for STM32F7 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 STM32F746ZG 144-pin microcontroller.

The mikromedia 7 for STM32F7 features integrated modules such as stereo MP3 codec, 7” TFT 800×480 touch screen display. The increased screen size is ideal for displaying larger amounts of data.

The board also contains an accelerometer, microSD card slot, buzzer, IR receiver, RGB LED diode, PIN photodiode, temperature sensor, 2.4GHz RF, WiFi, Ethernet and CAN transceivers, 8 Mbit flash memory, RTC battery, Li-Polimer battery charger, etc.

Additional components include MINI-B USB connector, power screw terminals, 2×5 JTAG connector, two 1×26 connection pads, ON/OFF switch and other. It comes with an onboard mikroProg™ for STM32 programmer and debugger, but can also be programmed with external programmers, such as ST-LINK programmer.

Power Supply

Power supply

The mikromedia 7 for STM32F7 board can be powered in four different ways: via two USB connectors using MINI-B USB cable provided with the board (CN4 or CN11), via battery connector using Li-Polymer battery (CN5) or via adapter connector using adapter power supply (CN3). After you plug in the appropriate power supply turn the power switch ON (SW1). The USB connection can provide up to 500mA of current which is more than enough for the operation of all on-board modules and the microcontroller as well. If you decide to use external power supply via screw terminals, voltage values must be within 5-12V DC range. Power LED ON (GREEN) indicates the presence of power supply. On-board battery charger circuit MCP73832 enables you to charge the battery over USB connection or via screw terminals. LED diode (RED) indicates when battery is charging. Charging current is ~250mA and charging voltage is 4.2V DC.

STM32F746ZG microcontroller

STM32F746ZG microcontroller

mikromedia plus for FT90x development tool comes with the FT900Q microcontroller. This 32-bit FT32 Core high performance microcontroller executes instructions from Shadow RAM, achieving true zero wait states at up to 100mHz, resulting in 310 DMIPS of performance.

Key microcontroller features

  • Up to 462 DMIPS Operation (216 MHz);
  • 1 MB of Flash memory;
  • 320 + 64 KB of SRAM memory;
  • up to 140 I/O pins;
  • 16/32-bit timers
  • 16MHz internal oscillator, 32kHz RTCC, PLL;
  • 4xUART, 3xSPI, 3xI2C, 2xCAN, 3xADC, 3XADC etc.
  • Ethernet, USB etc.

Programming the microcontroller

Programming the microcontroller

The microcontroller can be programmed in two ways:

  1. Using onboard mikroProg™ for STM32 programmer
  2. Using external programmers for STM32 (like ST-LINK)

Using mikroProg™ programmer

The microcontroller can be programmed with onboard mikroProg™ for STM programmer and mikroProg Suite™ for ARM® software. Connection with PC is established over an PROG USB connector. For proper insertion of the MINI-B USB cable. Signalization LED (LINK) is also provided on the opposite side of the PROG USB connector. It is also possible to program the microcontroler with external porogrammers, via 2×5 JTAG connector (CN1) with an appropriate adapter.

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-M7™ microcontroller families. It features intuitive interface and SingleClick™ programming technology. Software installation is available on following link:

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.

Software Installation wizard

Software installation wizard

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 26 on the side headers.

RTC Battery and Rest 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 26 on the side headers.

RTC Battery

mikromedia 7 for STM32F7 features an RTC battery holder for microcontroller RTC module. Battery is used as alternate source of power, so the RTC module can continue to keep time while the primacy source of power is off or currently unavailable. Three types of coin battery are supported: CR1216, CR1220 and CR1225.

Crystal oscillators and 2.048V reference

Crystal oscillators and 2.048V reference

The board is equipped with 1 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 USB-based applications. The board also contains 2 32.768 kHz crystal oscillator (X4) which provides external clock for internal RTCC module. Microcontroller ADC requires an accurate source of reference voltage signal. That is why we provide the external 3 voltage reference to the microcontroller VREF pin which is 2.048V.

microSD Card Slot

microSD Card Slot

Board contains 1 microSD card slot for using 2 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 pushing-out microSD card into the socket. Proper insertion of the microSD card is shown in the image above.

This code snippet initializes the FAT32 library for usage with SD card:

Touch Screen

Touch Screen

The development system features a 7‘‘ TFT 800×480 display covered with a resistive touch panel. Together they form a functional unit called a touch screen. It enables data to be entered and displayed at the same time. The TFT display is capable of showing graphics in 262K different colors.

For example here is how to programm the SSD1963 display driver to trigger the Fade-in effect on the display:

This is the callibration routine for the touchscreen controller:

Audio Module

Audio module

mikromedia 7 for STM32F7 features stereo audio codec 1 VS1053. This module enables audio reproduction and sound recording by using 2 stereo headphones with microphone connected to the system via a 3 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 (HDR2).

This is the function to start playing a chosen MP3 file from the SD card:

USB DEVICE connection

Audio module

ARM® Cortex™-M7 STM32F746ZG 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 1 MINI-B USB connector. For proper insertion of the 2 MINI-B USB see image above.

USB HOST connection

mikromedia 7 for STM32F7 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 1 USB HOST cable to be connected to the board, it is necessary to use the appropriate 2 MINI-B USB to USB type A adapter.

Accelerometer

Accelerometer

Onboard 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 I 2 C interface. There is an option to select the alternate accel address with jumper J3.

The following function reads 16 measurement samples from the accelerometer and returns the average value:

Flash Memory

Flash Memory

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).

RF Transceiver

RF Transceiver

mikromedia 7 for STM32F7 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). This RF transceiver module is widely used for wireless PC peripherals, remote controllers, VoIP headsets, game controllers, sensors, home and commercial automation, active RFID, toys and many more.

This function sends a data packet using nRF24L01:

Wi-Fi

Wi-Fi

mikromedia 7 for STM32F7 is equipped with SPWF01SA, a WiFi module with an integrated antenna from STMicroelectronics. The module packs a 2.4 GHz IEEE 802.11 b/g/n transceiver and its own STM32 ARM Cortex-M3 MCU that offloads the workload from the main microcontroller on the mikromedia. Full featured TCP/ IP protocol stacks are also integrated. A BOOT jumper (zero ohm resistor) for updating the firmware on the WiFi module is located nearby, between the module itself and the WiFi silkscreen markings.

This function is used to connect to the WiFi access point and start the web server:

Ethernet transceiver

Ethernet transceiver

The development board features an Ethernet transceiver module LAN8720A. It is ideal for local area networking (LAN). If you want to establish connection with a computer, router or other devices, the development board also contains a standard RJ-45 connector. Communication over Ethernet is based on data packets called frames. Each frame contains source and destination addresses and error-checking data so that damaged data can be detected and retransmitted. Signalization LEDs (green and yellow) are on the opposite side of the board.

This function queries the DHCP server for an IP address:

CAN communication

CAN communication

Controller Area Network (CAN or CAN bus) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer. CAN is a message-based protocol, designed specifically for automotive applications but now also used in other areas such as industrial automation and medical equipment. mikromedia 7 for STM32F7 is equipped with SN65HVD230 – a 3.3V CAN transceiver and a pair of screw terminals which provide microcontrollers with integrated CAN controller with the necessary physical interface for CAN communication. Make sure to correctly connect negative and positive differential communication lines before using this module.

Node termination jumper

If the board is the first and the last node of the CAN network, then TERMINATION jumper should be placed. If the board is a node in the middle, the jumper should be removed.

This short shippet shows the default initialization routine for the CAN module:

Buzzer

Buzzer

The board is also equipped with a 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.

This function plays a warning sound on the buzzer (three beeps of 100ms duration each, alternated with a 200ms delay):

Other modules

Other modules

The board also contains additional peripherals that can be very useful, such as 1 PIN photodiode, 2 IR receiver, 3 RGB led diode and 4 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. The demodulated output signal obtained from IR module can be directly decoded by a microcontroller. Many of existing standard data formats are supported. RGB (Red, Green , Blue) diode is suitable for light indication in your design. Each of colour is driven separately by transistor. The analog temperature sensor converts temperature to analog voltage and it is directly connected to the microcontroller analog pin. Temperature measurement range of mikromedia 7 for STM32F7 board is from -20°C to 70°C.

This function reads the current temperature using MCU’s 12 bit ADC module:

This function measures intensity of light using the MCU’s 12 bit ADC module:

This function displays color provided as an argument on RGB led:

Pads

Pads

Many microcontroller pins are available for further connectivity via two 1×26 rows of connection pads on both sides of the board. They are designed to match with mikromedia 7 SHIELD for STM32F746ZG.

What’s next?

Compiler and software

You have now completed the journey through each and every feature of mikromedia 7 for STM32F4 board. You got to know its 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. Find useful projects and tutorials on the Libstock website (www.libstock.com). Join our Forum (www.mikroe.com/forum) and get help from a large ecosystem of users.

Compiler

You still don’t have an appropriate compiler? Locate ARM® compiler that suits you best on our website: www.mikroe.com/arm/compilers Choose between mikroC™, mikroBasic™ and mikroPascal™ and download a fully functional demo version, so you can start building your first applications.

Visual TFT

Once you have chosen your compiler, and since you already got the board, you are ready to start writing your first projects. Visual TFT software enables you to quickly create your GUI. It will automatically generate code compatible with MikroElektronika compilers. Visual TFT is rich with examples, which are an excellent starting point for your future projects. Download it from www.mikroe.com/visualtft

By