Home > Electronics > STM32F4 Discovery Board running .NET MicroFramework – SITE RELOACTED

STM32F4 Discovery Board running .NET MicroFramework – SITE RELOACTED

October 23, 2012

Site Moved to : http://singularengineer.com/stm32f4-discovery-board-running-net-microframework/

About these ads
  1. Keno
    June 14, 2013 at 11:21 am

    I can not install the STM32_WinUSB_drivers_(for_evaluation_purposes_only). Can somebody help me how I should install this? thx

    • June 14, 2013 at 3:57 pm

      Which OS are you using? 7 or 8?. Also the site is moved to http:\\singularengineer.com . So please post the reply there and should be easy for others to follow.


  2. June 6, 2013 at 4:44 am

    I appreciate the information on your website. thnx.

  3. June 5, 2013 at 3:21 pm

    I must thank you for the efforts you have put in penning this blog.
    I am hoping to see the same high-grade blog posts from you in the future as well.

    In fact, your creative writing abilities has encouraged me to get my own blog now ;)

  4. June 4, 2013 at 6:54 pm

    Hi to all, the contents present at this web site are genuinely awesome for people knowledge,
    well, keep up the good work fellows.

  5. May 19, 2013 at 7:16 am

    Please let me know if you’re looking for a article author for your weblog. You have some really good articles and I think I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to
    write some content for your blog in exchange for a link
    back to mine. Please blast me an email if interested.
    Many thanks!

  6. sun
    May 10, 2013 at 5:04 am

    can u people tell me how to write an array of data in to USD (Mass storage device) using Stm32f4xx ….

  7. kemal
    May 2, 2013 at 9:00 pm

    I made all step,run the mfdeploy,selected usb but i couldnt connect stm32f4

    What should i do firstly.Where is my fault,


  8. ns
    March 31, 2013 at 10:57 am

    > driver link is dead. dev community needs this.
    i need it too.

    • April 7, 2013 at 8:32 pm

      All links seems to be working properly. which one is not working?

  9. jazz
    March 24, 2013 at 9:01 am

    driver link is dead. dev community needs this.

    • April 7, 2013 at 8:32 pm

      All links seems to be working properly. which one is not working?

  10. manmohan
    March 6, 2013 at 4:06 am

    Hello, really good & informative tutorial. I have successfully done this. But there is a problem now stlink is not communicating with stm32 board it gives internal command error. what should I do ? how I can retain original configuration of stm32 baord ?

    • March 6, 2013 at 9:22 pm

      Use Mini USB connector (not the Micro). Also erase the chip and sectors completely and you are good to go.

      To get the firmware that board already had when you received, you need to download it form the ST site. I forgot the location, but it was along with their peripheral library. Download it and compile it with Keil or other compilers (you get free versions with code limit – don’t worry, you won’t exceed).

  11. PT
    February 11, 2013 at 9:58 am

    Update on USB driver problems – solved!

    I posted on 31st Jan about problems I was having getting the USB link to work reliably. There seemed to be a caveat about the USB drivers (‘for evaluation only’) and I had assumed that was the problem and laid all the blame on that. I corresponded briefly with Cuno Pfister and he explained that there was no problem with the drivers, only that a licensing issue required them to be released as ‘for evaluation only’. After LOTS of installing and re-installing I finally found the cause of the problem – my ‘5V USB supply’ was actually running at about 4.5V, and this caused the intermittent and sporadic failure of the system. Since I started using an independent 5V supply ALL the problems have gone away – if you are having problems, check your USB supply voltage.

    I’m still looking for a definitive list of pin numbers/device numbers for all the interfaces. I have got the 4 LEDs going (at 100kHz), plus UART and PWM. I’d like to explore I2C but don’t know where to start looking – even when I find the pin numbers, its not always straightforward to link up with the .NET/c# references to these I/O systems. Is there a definitive list anywhere? Anyone fancy drawing one up, or starting to contribute to the development of one?

    This is a fantastic piece of kit which exploits the rich development environment of .NET/c#/VS2010, although I have yet to push the boundaries of performance, given the limitations of .NET.

  12. Vishal K M
    February 2, 2013 at 5:28 pm

    Hello, thanks for the article.
    I have done program the boot loader, MS deploy detects my STM32 Discov, All is ok. But when i compile (USB in property setting as you given) nothing happen, when i press debug button it will be disabled, hope the debugging is going on, but even after 2,3 minutes it is the same. Can we see program loading?
    What will happen when we press debug button?


    • Vishal K M
      February 2, 2013 at 6:13 pm

      I dont have this file and directory

      • February 10, 2013 at 5:17 pm

        you need to install the .net microframework

  13. L0nger
    January 30, 2013 at 11:58 pm


    I appreciate your article a lot. However, I have serious problem forcing my stm32f4discovery board to work. I successfully uploaded tinybooter.hex and after reset, the system (win 7 x64) detected STM32 .Net Test device. I chose usb drivers to install then and everything appeared to be fine. But MFDeploy cannot see any device connected to USB. I have rev Z board. There is nothing connected to the board except two usb cables and I ereased my chip using ST-LINK utility. Any ideas? I really wanted to evaluate .Net framework on my ARM uC. Thanks in advance.

    • P Tranter
      January 31, 2013 at 8:21 am

      Hi L0nger (and everyone)

      I’m having the same problem with the WinUSB drivers. I have had the whole thing up and running, and I’ve deployed several apps to the STM board, but then it all stops and Windows either doesn’t recognise STM.Test or it recognises it and then says there is an error. Endless connecting and disconnecting and erasing and reflashing sometimes fixes it, but often doesn’t. Under these conditions MFDepoy cannot see it.

      Its a great pity, because when it does work, its fantastic! I’ve posted a query to Cuno Pfister who seems to be the originator of some of this – especially the drivers – and am hoping for some advice. The WinUSB drivers do carry a warning though, so we may have to accept this until they become more stable. Trouble is, I really want to get going.

      On a slightly different topic, when it did work, I managed to get all the GPIO pins toggling – even the four LEDs on the STM board, but I’m stuck as to how to find the PWM, I2C, UARTs etc. (and which is which). I’m sure its in the documentation somewhere, but I’m not all that familiar with this stuff, so I do not know where to look.

      Anyone help?

      • L0nger
        February 2, 2013 at 10:19 am


        thanks for your reply. I will greatly appreciate if you post some information about the driver when you contact the author.

        It seems though that it’s the matter of driver, not the board. I really doubt that boards rev A,B,Z differ much from each other.

    • February 1, 2013 at 4:49 pm

      After downloading the tinybooter.hex and restarting the board the mini usb is used as a mere power supply. The micro usb connected is what the microframework will be dealing with.

      • L0nger
        February 2, 2013 at 10:22 am

        Yep, you’re right. I tried connecting and disconnecting, erasing and flashing many times. Nothing helped. The driver installs well, but MFDeploy cannot see the device.

  14. P Tranter
    January 28, 2013 at 6:38 pm

    Sorry to be a bit picky – I like this and I’m going to try it – but the first picture shows a USB Mini connection, not a USB micro connection – which is correct?

    Thanks for an interesting project

    • February 1, 2013 at 4:51 pm

      The mini usb will be used up till you burn the tinybooter.hex. After that the mini usb will act just as a power supply for the board. The micro usb will used for the other 2 hex file and MFDeploy step.

  15. Julian
    January 24, 2013 at 5:40 pm

    Pretty nice post. I just stumbled upon your blog and wished
    to say that I have truly enjoyed surfing around your blog posts.
    After all I will be subscribing to your feed and I hope you write
    again soon!

  16. Mensecretmojo.Com
    January 19, 2013 at 5:39 pm

    Hello colleagues, how is all, and what you desire to say about this post,
    in my view its truly remarkable designed for me.

  17. vrafael
    January 12, 2013 at 10:07 pm

    Thanks, I run it

  18. wordpress premium tema
    December 22, 2012 at 7:37 am

    There’s certainly a great deal to learn about this topic. I love all of the points you made.

  19. valencia
    December 21, 2012 at 12:36 am

    I’m really impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a nice blog like this one nowadays.

    • January 18, 2013 at 10:11 pm

      Sorry for a very late reply. No – this is not a payed job. Its just something I want to try writing a blog.

      • Bernhard
        January 23, 2013 at 2:53 pm

        I think these are just generic spam comments, trying to place links to their websites for SEO (search-engine-optimizing). You’d better delete them than reply…
        PS. I like your article!

  20. Antwan
    December 3, 2012 at 11:59 pm

    In case you are not offering your services in multiple cities then
    probably there will be no benefit of posting classifieds in that city however this doesn’t
    mean that you cannot post your advertisements or the classifieds in that city but what
    you have to keep in mind is to mention that the service is available in selected or in one city only.
    In these times where the cost of living increases and wages are not,
    it seems that charity shops will remain popular not only
    because of the money they raise for good causes, but also because no
    other Store offers quite the same mix of exclusivity and in any major agreements in the same
    way that a charity shop can. If you don’t know then don’t
    hesitate to ask the salesman: “Is this absolutely everything
    I’m going to need.

  21. Sleepz
    November 22, 2012 at 10:40 am

    Hello, really good tutorial ;-) Led blinking in 15 minutes after reading this.
    But i have problem, can i connect USB Keyboard (HID) to this device? I dont know how to do it with .NET, what i need to include and how to connect debug+keyboard both?
    Thanks for reply Roman

    • November 24, 2012 at 5:44 pm

      Dear Roman,
      I never tried a USB keyboard or mouse before with .netMF. Don’t want to give you a wrong direction with thinks i don’t know. But if you find something i’ll be happy to see a walk-through of it.

  22. masarat
    November 8, 2012 at 1:00 am

    I have to thank you for the efforts you have put in writing this website.
    I’m hoping to see the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has motivated me to get my own, personal blog now ;)

  23. Dario Greenbaum
    November 4, 2012 at 6:53 pm

    I believe that it is best to write extra on this matter STM32F4 Discovery Board running .NET MicroFramework Singular Engineer. It won’t be a taboo subject but generally individuals are not sufficient to speak on such topics.

  24. Madartsoft_co_uk
    November 2, 2012 at 3:56 pm

    yes, there are already plenty of dev boards with netmf but if someone consider build own system based on netmf then there is solution to build own board. I’ve already designed my own board with additional 8MB flash.

  25. awaiK
    October 27, 2012 at 10:28 am

    Thanks for this tutorial

  26. Tom
    October 24, 2012 at 10:05 pm

    Hi there! Nice write-up. I’ve been trying (with little success) to follow your procedure.

    I’ve hit a stumbling block when deploying the ER_FLASH hex file, using MFDeploy. I am able to do everything up to this point, including load the ER_CONFIG file successfully, but I can’t get ER_FLASH to deploy. The process starts, and then fails when attempting to write (may have been erase, I’m not at work to check currently) the first memory location for the ER_FLASH file.

    Can you offer any thoughts as to why this may be? I have the GHI gadgeteer system installed, but that shouldn’t be affecting this separate process, right? Maybe I somehow have a different version of the ER_FLASH hex file?

    I’d be very grateful for any suggestions from anyone!



    • October 24, 2012 at 10:22 pm

      Are you working with STM32F4 Discovery board? Make sure you have nothing connected to the discovery board (all pins should be free – nothing should be connected to the pins.also make sure when you erase the chip you also did erase all the sectors (as given in the screenshot. Try writing ER_FLASH first. Also make sure you downloaded the right files. The gadgeteer will not affect this.

      • Tom
        October 24, 2012 at 10:29 pm

        The board is stock, fresh from the blister pack. Nothing is connected to any pins. I have followed your procedure to the letter, and tried several times, including varying the order of ER_FLASH & ER_CONFIG, with the same error every time. The files were downloaded from the link you provided… I will try with a colleagues board tomorrow, but given that the error exists for only ER_CONFIG, I suspect that file, rather than hardware. I will re-download the files and try that too.



        • Tom
          December 3, 2012 at 3:50 pm

          Hi Again,

          I’m still having trouble with this! I’ve checked all the previously mentioned points, and the only difference that I can find in my method / setup is that I have a Rev Z MCU, as opposed to your Rev B. Is this likely to make any difference?



      • Tom
        December 5, 2012 at 2:02 pm


        I’ve finally found where my process was falling down. In MFDeploy, I was selecting and deploying the ER_FLASH and ER_CONFIG one by one. This always resulted in failiure.

        If both files are selected in the browse dialog, and deployed together, the procedure works.

        With that sorted, I’m now up and running with the serial ports and LED’s, with my sights set on the rest of it before too long!

        Thanks again for the writeup,


  27. hans hansen
    October 24, 2012 at 8:59 pm

    Is it possible to use System.IO.Ports.Serial on the discovery board, and when how?

    • October 24, 2012 at 9:44 pm

      Here is a bunch of tutorial that might help you http://www.ghielectronics.com/support/dotnet-micro-framework

    • LouisCPro
      October 31, 2012 at 9:22 am

      Simply try this :

      Serial1 = new SerialPort(SerialPorts.COM2, (int)BaudRates.Baud9600, Parity.None, 8, StopBits.One);

      And connect to the related pins on the STM32F4DISCOVERY :

      rxPin = Pins.GPIO_PIN_A_3;
      txPin = Pins.GPIO_PIN_A_2;
      ctsPin = Pins.GPIO_PIN_A_0;
      rtsPin = Pins.GPIO_PIN_A_1;

  28. hans hansen
    October 24, 2012 at 7:35 pm

    If you use this code you dont need an external LED. You have to add c:\MicroFrameworkPK_v4_2\DeviceCode\Targets\Native\STM32\ManagedCode\Hardware\CPU.cs to project.

    using System;
    using System.Threading;
    using Microsoft.SPOT;
    using Microsoft.SPOT.Hardware;

    namespace STM32F_Test
    public class Program
    public static void Main()

    OutputPort led = new OutputPort(Microsoft.SPOT.Hardware.STM32.Pins.GPIO_PIN_D_12, false); //PA1 on discovery board
    while (true)



    • October 24, 2012 at 9:30 pm

      Yes and it comes with installation of Porting Kit 4.2 which was not listed in the list of required items. But yes, you can use it.

  29. KedasProbe
    October 23, 2012 at 6:08 pm

    Does this work on STM32F3 ? (with less memory)

    • October 24, 2012 at 1:10 am

      I doubt it. CLR requires at least 64KBytes of RAM. F3 series according to ST’s site says “The STM32 F3 series includes devices with 64 to 256 Kbytes of on-chip Flash memory, up to 48 Kbytes of SRAM” which i don’t think is sufficient.

  30. Danzar
    October 23, 2012 at 5:03 pm

    Very Nice…

  31. Bertrand Le Roy (@bleroy)
    October 23, 2012 at 4:55 pm

    It’s great to run .net on the ST dev board, as those are dirt cheap, but there already is a STM32 board running .NET MF: the Netduino Go…

  32. April 9, 2013 at 12:51 am

    Plagiarism is not encouraged in any ways. Have to mark the URL as spam since it contained a lot of plagiarized materials with links redirecting to social networks. Lets keep it clean.

  33. Bernhard
    April 9, 2013 at 6:00 am

    You should delete some more comments here. Look out for the SEO spam with links to their websites, like
    wordpress premium tema

    Best disable the “website” field for comments in the future…

    Take care B

  34. April 10, 2013 at 7:42 pm

    Thanks Bernhard. I’m just trying to remove the link in their names.

  1. May 30, 2013 at 3:33 am
  2. April 1, 2013 at 10:20 pm
    HD44780 LCD Running on .Net Micro Framework Device | The Road Taken
  3. February 8, 2013 at 6:46 am
    Running .NET Micro Framework on STM32F4 Discovery Board |
  4. October 24, 2012 at 2:55 pm
    Microcontroller | Pearltrees
  5. October 23, 2012 at 4:44 pm
    Belgaum news | About Belgaum | Belgaum information | Belgaum district | Belgaum city | Belgaum Hotels | Belgaum People | Belgaum tourism | Belgaum entertainment | Belgaum students | Inside facebook | Hack | make use of | technical news | | .NET for the ST
  6. October 23, 2012 at 4:11 pm
    .NET for the STM32 F4 Discovery board | Cool Internet Projects
  7. October 23, 2012 at 4:06 pm
    .NET for the STM32 F4 Discovery board | Siecurity.com
  8. October 23, 2012 at 4:02 pm
Comments are closed.

Get every new post delivered to your Inbox.

Join 216 other followers

%d bloggers like this: