UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction



Similar documents
UM1790 User manual. Getting started with STM32L053 discovery kit software development tools. Introduction

SPC5-FLASHER. Flash management tool for SPC56xx family. Description. Features

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

UM1680 User manual. Getting started with STM32F429 Discovery software development tools. Introduction

M24LRxx/CR95HF application software installation guide

Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Description

AN3332 Application note

AN3354 Application note

AN4108 Application note

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

STEVAL-IEG001V2. Smart real-time vehicle tracking system. Features

EN: This Datasheet is presented by the m anufacturer. Please v isit our website for pricing and availability at ore.hu.

LM337. Three-terminal adjustable negative voltage regulators. Features. Description

UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction

Description. Table 1. Device summary. Order code Temperature range Package Packaging Marking

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

Table 1. Absolute maximum ratings (T amb = 25 C) Symbol Parameter Value Unit. ISO C = 330 pf, R = 330 Ω : Contact discharge Air discharge

AN4156 Application note

AN3998 Application note

DDSL01. Secondary protection for DSL lines. Features. Description

AN3990 Application note

AN3265 Application note

STTH1R04-Y. Automotive ultrafast recovery diode. Features. Description

Description. Table 1. Device summary

Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension

BD238. Low voltage PNP power transistor. Features. Applications. Description. Low saturation voltage PNP transistor

TN0023 Technical note

Description. Table 1. Device summary. Order codes. TO-220 (single gauge) TO-220 (double gauge) D²PAK (tape and reel) TO-220FP

EVL185W-LEDTV. 185 W power supply with PFC and standby supply for LED TV based on the L6564, L6599A and Viper27L. Features.

BD241A BD241C. NPN power transistors. Features. Applications. Description. NPN transistors. Audio, general purpose switching and amplifier transistors

AN2604 Application note

2STBN15D100. Low voltage NPN power Darlington transistor. Features. Application. Description

AN4128 Application note

UA741. General-purpose single operational amplifier. Features. Applications. Description. N DIP8 (plastic package)

ULN2801A, ULN2802A, ULN2803A, ULN2804A

AN2389 Application note

AN3155 Application note

TDA W CAR RADIO AUDIO AMPLIFIER

BD135 - BD136 BD139 - BD140

AN3110 Application note

ST High voltage fast-switching NPN power transistor. Features. Applications. Description

Description SO-8. series. Furthermore, in the 8-pin configuration Very low-dropout voltage (0.2 V typ.)

AN2557 Application note

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

AN2824 Application note

AN4368 Application note

ETP01-xx21. Protection for Ethernet lines. Features. Description. Applications. Benefits. Complies with the following standards

ULN2001, ULN2002 ULN2003, ULN2004

AN3353 Application note

ESDLIN1524BJ. Transil, transient voltage surge suppressor diode for ESD protection. Features. Description SOD323

DSL01-xxxSC5. Secondary protection for DSL lines. Features. Description. Applications. Benefits. Complies with the following standards

AN3252 Application note

AN2680 Application note

ST19NP18-TPM-I2C. Trusted Platform Module (TPM) with I²C Interface. Features

LM135-LM235-LM335. Precision temperature sensors. Features. Description

Description. IO and RF AGC. ASIC controller and power management. Carrier recovery loop. GPIO switch matrix. Lock indicator and monitoring DVBS2 FEC

Figure 1. STM32F429 Discovery board: STM32F429I-DISCO

AN3270 Application note

BZW50. Transil, transient voltage surge suppressor (TVS) Features. Description

Order code Temperature range Package Packaging

TDA2004R W stereo amplifier for car radio. Features. Description

LM134-LM234-LM334. Three terminal adjustable current sources. Features. Description

L78MxxAB L78MxxAC. Precision 500 ma regulators. Features. Description

STTH110. High voltage ultrafast rectifier. Description. Features

AN2146 APPLICATION NOTE

AN2866 Application note

MC34063AB, MC34063AC, MC34063EB, MC34063EC

STTH2R06. High efficiency ultrafast diode. Features. Description

32F072BDISCOVERY. Discovery kit for STM32F072xx microcontrollers. Features. Description

AN3359 Application note

STP60NF06. N-channel 60V Ω - 60A TO-220 STripFET II Power MOSFET. General features. Description. Internal schematic diagram.

UM1969 User manual. Getting started with STM32F746G discovery software development tools. Introduction

STP60NF06FP. N-channel 60V Ω - 30A TO-220FP STripFET II Power MOSFET. General features. Description. Internal schematic diagram.

AN2760 Application note

AN2703 Application note

STN3NF06L. N-channel 60 V, 0.07 Ω, 4 A, SOT-223 STripFET II Power MOSFET. Features. Application. Description

AN3997 Application note

UM0834 User manual. Developing and debugging your STM8S-DISCOVERY application code. Introduction. Reference documents

MC Low noise quad operational amplifier. Features. Description

L6234. Three phase motor driver. Features. Description

AN1819 APPLICATION NOTE Bad Block Management in Single Level Cell NAND Flash Memories

AN974 APPLICATION NOTE

STDP2600. Advanced HDMI to DisplayPort (dual mode) converter. Features. Applications

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

UM0109 USER MANUAL. Public Transport Ticketing Demo

AN4571 Application note

AN2328 Application note

UM1075 User manual. ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32. Introduction

AN820 APPLICATION NOTE INPUT/OUTPUT PROTECTION FOR AUTOMOTIVE COMPUTER

P6KE. Transil, transient voltage surge suppressor (TVS) Features. Description. Complies with the following standards

AN438 APPLICATION NOTE SAFETY PRECAUTIONS FOR DEVELOPMENT TOOL TRIAC + MICROCONTROLLER

AN4427 Application note

UM0462 User manual. STM32 and STM8 Flash loader demonstrator. Introduction

AN1754 APPLICATION NOTE

AN3327 Application note

STM32F4DISCOVERY. Discovery kit with STM32F407VG MCU. Features. Description

STP55NF06L STB55NF06L - STB55NF06L-1

AN3211 Application note

BTW N. 50 A 1200 V non insulated SCR thyristor. Description. Features. Applications

Transcription:

User manual Getting started with.net Micro Framework on the STM32F429 Discovery kit Introduction This document describes how to get started using the.net Micro Framework (alias NETMF) on the STM32F429 Discovery board (32F429IDISCOVERY). It presents the software and hardware environment required to build a.net Micro Framework application. A set of C# example projects are provided within the STM32F429I_Discovery_NETMF_ Package (STSW-STM32141) allowing fast exploration of this environment. NETMF is a developer platform for small embedded devices that gives C#, Visual Basic, or Visual Studio programmers access to a subset of the NET framework programming libraries. It is assumed the reader is already proficient in one of these programming languages. This document is structured as follows: Chapter 1 presents the required software and hardware environment to get started with.net Micro Framework: Microsoft Visual Studio Microsoft.NET Micro Framework Software Development Kit STM32F429I_Discovery_NETMF_Package STM32 ST-LINK Utility STM32F429I_DISCOVERY NETMF USB driver Chapter 2 describes how to build and deploy applications on the hardware. Chapter 3 describes how to remove applications. Chapter 4 contains links to useful web sites. January 2014 DocID025302 Rev 1 1/13 www.st.com

Contents UM1676 Contents 1 Software environment........................................ 3 2 Create first NETMF application................................ 5 3 Erase deployment section using MFDeploy..................... 10 4 Useful links............................................... 11 5 Revision history........................................... 12 2/13 DocID025302 Rev 1

Software environment 1 Software environment The following software is needed to develop a.net Micro Framework (NETMF) application. It should be installed if it is not already on your PC. 1. Microsoft Visual Studio 2012: You can use the Express edition, a time-limited free evaluation version, downloadable from http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products. 2. Microsoft.NET Micro Framework SDK version 4.3 downloadable from http://netmf.codeplex.com/downloads/get/500745. 3. STM32F429I_Discovery_NETMF_Package: Contains binaries, NETMF USB driver, libraries and examples required to develop and run a.netmf application on the STM32F429 Discovery board. It is available from www.st.com/stm32f4-discovery by selecting the product 32F429IDISCOVERY. Figure 1. STM32F429I_Discovery_NETMF_Package Examples: Visual Studio NETMF projects (C#) NETMF Binary image NETMF USB Driver STM32F429I-Discovery managed library MS33234V2 4. STM32 ST-LINK Utility: You can use this utility to load the NETMF binary core into the STM32F429 Discovery. It can be downloaded from www.st.com/stlinkv2. ST-LINK Utility automatically installs the ST-LINK/V2 USB driver. The STM32F429I_Discovery_NETMF_Package\NETMF_Binary_Image contains the NETMF binary image which consists of three hex files that should be loaded using ST- LINK Utility into the STM32F429 Discovery board. DocID025302 Rev 1 3/13 13

Software environment UM1676 5. STM32F429I_DISCOVERY NETMF USB driver: USB USER (CN6) is used to deploy and debug a NETMF application on the STM32F429 Discovery. After loading the NETMF binary into the STM32F429 Discovery, install the NETMF USB driver. a) Connect the STM32F429 Discovery to the computer using USB USER connector. A device called "STM32F429 DISCOVERY" will be detected. b) When windows asks for the driver, browse to the STM32F429I_DISCOVERY NETMF driver in the STM32F429I_Discovery_NETMF_Package. c) Once installation is done, an STM32F429I_DISCOVERY NETMF will be displayed in the device manger as displayed in Figure 2. You are now ready to start your first NETMF application on the STM32F429 Discovery board. Figure 2. Windows Device manager 4/13 DocID025302 Rev 1

Create first NETMF application 2 Create first NETMF application A good way to get familiarized with the NETMF Development Environment is to create a simple LED toggle program to run on the STM32F429 Discovery board. 1. Start Microsoft Visual Studio. 2. From the main menu, select File > New Project 3. Click Visual C# > Micro Framework, select Console Application then click the OK button. Figure 3. New project window 4. Our first NETMF project is created with only one C# source file named "Program.cs". This program displays a "Hello World!" message in the output window of Visual Studio. Program.cs contains only one class, Program, and one method, Main(), which is the first method called when the program is run. DocID025302 Rev 1 5/13 13

Create first NETMF application UM1676 Figure 4. First NETMF project Note: 6. To toggle an LED, the "Microsoft.SPOT.Hardware" component must be added to the project: a) Right click on the References in the solution explorer. b) Select Add Reference. c) Select Microsoft.SPOT.Hardware from the Add Reference window. 7. Add "STM32F429I_Discovery.Netmf.Hardware.cs" library to the project, it contains necessary classes and methods to use features like LEDs: a) Right click on the MFConsoleApplication1 in the solution explorer. b) Select Add > Existing Item c) Browse to the "STM32F429I_Discovery.Netmf.Hardware" folder in the STM32F429I_Discovery_NETMF_Package. You can Add As link to avoid copying the source file into the project folder. 6/13 DocID025302 Rev 1

Create first NETMF application Figure 5. Add Reference window 8. Modify the generated Program.cs file (displayed in Figure 4) as shown in bold below: using System; using Microsoft.SPOT; using STM32F429I_Discovery.Netmf.Hardware; // Needed for LED toggling using System.Threading; // Needed for Sleep() function namespace MFConsoleApplication1 { public class Program { public static void Main() { LED.LEDInit(); //LED initialization while (true) { LED.GreenLedToggle(); // Tooggle green led Thread.Sleep(500); // wait 500 ms } } } } DocID025302 Rev 1 7/13 13

Create first NETMF application UM1676 In this code, you added "STM32F429I_Discovery.Netmf.Hardware" namespace which is declared in the STM32F429I_Discovery.Netmf.Hardware.cs file to be able to use the LED class. LED.Init() configures the LEDs GPIO port and LED.GreenLedToggle() toggles the green LED. Note: Click on the method call and press F12 to go to its implementation. 9. Click on Build > Build Solution from the main menu (alternatively, click F7). Figure 6. Build output window 10. Once the project is built successfully, the application must be loaded into the STM32F429 Discovery booard. By default, a new project is configured to work with the Emulator. It must be changed to use USB as deployment transport from the Properties in the Solution Explorer (See Figure 7). The board should be connected to the computer and "STM32F429I_DISCOVERY_a7e70ea2" should be displayed in the Device name. Figure 7. Properties window 11. Click on Debug > Start Debugging from main menu to load application and enter debug session. 8/13 DocID025302 Rev 1

Create first NETMF application Figure 8. Debugging in Visual Studio The green LED on the STM32F429 Discovery board should now be toggling. Visual Studio offers many debug features like breakpoints, watch, view memories and step by step execution, that allow easy debug of your application and step by step execution. To speed up NETMF development on the STM32F429 Discovery board, several C# example programs are available in the STM32F429I_Discovery_NETMF_Package under the "Examples" folder. For more information about the examples, a readme file is provided with each example describing its behavior and hardware requirements. DocID025302 Rev 1 9/13 13

Erase deployment section using MFDeploy UM1676 3 Erase deployment section using MFDeploy The NETMF SDK has a useful tool called MFDeploy. it provides many helpful features such as erasing the deployment sectors. A C# application in the deployment section alters the debug communication and Visual Studio cannot override it. To erase the deployment section: 1. Reset the board while pressing the USER button, to enter TinyBooter mode. 2. Open the MFDeploy from windows Start menu > Microsoft.NET Micro Framework 4.3. 3. Select USB as debug channel, "STM32F429I_DISCOVERY_a7e70ea2" should be displayed in the Device name. Make sure that there's no ongoing Visual Studio debug session. 4. Click on Erase button to open the erase window. 5. Select Deployment and click on Erase button. Figure 9. Erasing deployment section using MFDeploy After erasing the deployment section and resetting the board, you can launch a new debug session using Visual Studio. 10/13 DocID025302 Rev 1

Useful links 4 Useful links The following links provide inspiration and many more examples: NETMF community development site: www.netmf.com Codeplex STM32 NETMF project: netmf4stm32.codeplex.com STM32 NETMF solutions by Mountaineer: http://www.mountaineer.org/netmf-for-stm32 DocID025302 Rev 1 11/13 13

Revision history UM1676 5 Revision history Table 1. Document revision history Date Revision Changes 13-Jan-2014 1 Initial release. 12/13 DocID025302 Rev 1

Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ( ST ) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B) AERONAUTIC APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE APPLICATIONS OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE, THE PURCHASER SHALL USE PRODUCTS AT PURCHASER S SOLE RISK, EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE, UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR AUTOMOTIVE, AUTOMOTIVE SAFETY OR MEDICAL INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. 2014 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan - Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com DocID025302 Rev 1 13/13 13