Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Anything not related to a specific project.

Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby IPenguin » Tue Oct 05, 2010 3:11 am

Last week I ordered an ST32VLDISCOVERY evaluation board out of curiosity - what can you do much wrong
when paying about US$ 10 for an evaluation board with

- a 32-Bit ARM Cortex-M3 MCU (128k Flash, 8k RAM) - STM32F100RBT6B
- an integrated SWD  (Single Wire Debug) debug adapter (they use a more powerful STM32F103 than the actual MCU for this and call it Embedded ST-LINK)
  that can be used as a stand-alone SWD debugger/emulator interface for other STM32 based boards as well
- all 64 pins of the STM32100 are brought out on extension headers
- 2 user LEDs and one user push button

The advertisement that caught my attention claimed: "Extension header for all QFP64 I/Os for quick connection to prototyping board or easy probing".

The board (I got from Farnell) comes in a transparent plastic sales box - with a card containing some short getting started instructions and links - without any visible static protection. After unpacking the board - you actually have to hold it by the pins to pull it out - I faced the first problem - it won't fit on any of my numerous breadboards! The two main header rows are spaced too wide apart (about 30,5 mm, exceeding the width of the breadboarding area) and the short header row at the small side opposite to the USB connector makes it completely impossible to insert the board into (a) breadboards (the 6 pins PB10 ... PB15 either collide with solid areas or will get shorted).

But then I took two half-sized breadboards and inserted each of the long header rows in one of them ... works perfect (see picture below)! An other good thing is that the pins stick out a good way above the board, enough to attach LA probe cables or female flywires directly!

Power can be either applied via the USB connector - an USB cable is not included in the kit! - or via the header pins (5V or 3V3 and GND) due two protection diodes. :)

How to get started? All essential documentation and links to the software can be found on the STM32VLDISCOVERY page - user manual for the board and the STM32VLDISCOVERY firmware package. ST provides easy to follow introductions that explain how to develope and debug code for the STM32VLDISCOVERY for 3 development environments
- IAR Embedded Workbench
- Keil MDK-ARM
- Atollic TrueSTUDIO
Free versions can be downloaded from the manufacturers' websites - so they are code limited they are sufficient to compile all examples provided and to do some serious evaluation. It's a good starting point, later you can switch to a GCC based free toolchain. For this I chose Atollic TrueSTUDIO STM32 Lite version as it's Eclipse/GCC/GDB based. However, the Lite version supports C only but not C++.

You may want to try the STM32 ST-Link Utility (documentation) as well - it's a stand-alone tool that makes use of the onboard ST-Link interface and allows programming, erasing, tracing, single-stepping and viewing the MCUs core registers from outside the development environment.

For about US$ 10 you get a well designed basic 32-bit ARM Cortex-M3 evaluation board with an integrated SWD debug interface that's supported with good documentation and software. In contrast to many if not most other much more expensive evaluation kits you see these days, this one has (almost) no restrictions - all pins are easily available and can be used for experiments and designs. It's a perfect platform to start exploring the STM32 (value) line of MCUs and for your own perfboard projects.
Attachments
STM32VLDISCOVERY_in_Box.jpg
STM32VLDISCOVERY_2Breadboards.jpg
STM32VLDISCOVERY_2Breadboards_P10-P15.jpg
STM32VLDISCOVERY_Flywire.jpg
Last edited by IPenguin on Thu Oct 14, 2010 3:33 am, edited 1 time in total.
User avatar
IPenguin
Global Moderator
Global Moderator
 
Posts: 430
Joined: Mon Nov 16, 2009 3:16 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby ian » Tue Oct 05, 2010 3:38 am

Nice review. Is the schematic/firmware for the debugging portion available?
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby rsdio » Tue Oct 05, 2010 4:16 am

Thanks for the review.

I wish they had moved the pins to the edge of the board, and placed the text labels on the inside.  That excess PCB with the labels is just in the way!

I had hoped that the STM32F100RBT6B would have USB capabilities, but it appears that the USB mini jack is for power, only.  At least the data sheet says nothing at all about USB support.  Even though I kinda hate USB, it's so damn easy to interface to computers.  I guess I should start learning ethernet and wireless...
User avatar
rsdio
Developer
Developer
 
Posts: 1407
Joined: Sun Feb 28, 2010 10:53 pm
Location: Seattle

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby tayken » Tue Oct 05, 2010 4:19 am

Nice review. I think the same way as rsdio, that label parts look unnecessary.

Do they have an open source library for ethernet or is it Microchip style?
User avatar
tayken
Developer
Developer
 
Posts: 1507
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby ian » Tue Oct 05, 2010 4:42 am

http://blog.willdonnelly.net/2010/10/02 ... us-pirate/

Lots of people must be getting these. I just got a contact form email with a how-to for debugging this board with teh Bus Pirate under Linux :)
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby IPenguin » Tue Oct 05, 2010 5:15 am

The SWD part is on the schematics - the schematics are complete (no hidden/greyed-out parts like on the schematics of some Xilinx boards i.e.). I haven't seen/found the SWD firmware for the STM32F103, yet. I appears to be proprietary. On the other side, the SWD can be disabled and replaced with a true JTAG interface via the pins - requires an extra  JTAG adaper, so. This may explain how people use the BusPirates JTAG/OpenOCD support to debug the board.

I agree with rsdio and tayken regarding the positioning of the pins on the long side - they are too wide apart for a breadboard, so they could have moved them all the way to the edge. However, the most unpractical issue about the pins are the 6 vertical pins on the side opposite to the USB connector. :D

The STM32F100 value line of MCUs has no USB controller on board. They are tailored for low-power control applications without much communication needs. The USB connector is for the ST32 ST-Link (SWD) interface and power. It's controlled by the STM32F103 "SWD MCU".

The STM32VLDISCOVERY has no Ethernet controller (and no USB controller). However, STM has a STM32 Ethernet Library for their STM32F107 MCUs with integrated Ethernet controller. The examples are all based on uIP and the release notes of the Ethernet Library package (and the USB OTG Library) read:

The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.


... whatever that means. ;)
Last edited by IPenguin on Tue Oct 05, 2010 7:21 am, edited 1 time in total.
User avatar
IPenguin
Global Moderator
Global Moderator
 
Posts: 430
Joined: Mon Nov 16, 2009 3:16 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby alm » Tue Oct 05, 2010 3:55 pm

IPenguin wrote:The examples are all based on uIP and the release notes of the Ethernet Library package (and the USB OTG Library) read:

The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.


... whatever that means. ;)

No license / copyright statement = all rights reserved (not sure if you're even allowed to use it, let alone distribute/modify) in all countries that signed the Berne convention as far as I know (not a lawyer).
alm
Jr. Member
Jr. Member
 
Posts: 92
Joined: Sun Jan 10, 2010 7:01 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby robots » Tue Oct 05, 2010 4:00 pm

There is a statement in official forum (official statement). In short it means, that we own the copyright to the library, and take no responsibility for it, and you are allowed to use it modify it freely. I don't think that there are any restrictions like in the Mchip library. (I have already posted the link to the forum in here some time ago, and i am too lazy to look for it)

I am just jealous, that IPenguin got it before I did. :-P

Btw, there are two STM32 cpu's that can be programmed freely :)
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby alm » Tue Oct 05, 2010 4:09 pm

robots wrote:There is a statement in official forum (official statement). In short it means, that we own the copyright to the library, and take no responsibility for it, and you are allowed to use it modify it freely. I don't think that there are any restrictions like in the Mchip library. (I have already posted the link to the forum in here some time ago, and i am too lazy to look for it)

That is a license (MIT-style), even though they explicitly deny the existence. I would be careful (why not put that statement on the download page) and request the statement in writing from someone with authority before using it in commercial works or spending lots of time on it, it seems strange to state that there's no license and include a license in a forum. I would not normally consider a forum statement to override the download page, and I doubt a judge would. The forum might even contain a disclaimer to that effect.
alm
Jr. Member
Jr. Member
 
Posts: 92
Joined: Sun Jan 10, 2010 7:01 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby IPenguin » Tue Oct 05, 2010 7:18 pm

Different countries, different laws ... different courts/judges, different decisions.
Eventhough I am inclined to agree with robots, I wouldn't assume anything unless
I'd have a written statement, signed by an authorized STM representative or an
equivalent license statement included in the library pack before I'd distribute it
freely, regardless in what form (modified source/library, object or executable format).

The license for the hardware clearly states that the board can neither be sold by
itself or integrated into a system unless you are an official STM reseller/distributor.
In some way it makes sense as they want people to explore/evaluate the STM32
MCUs and don't make any money on the kit - probably they put money into it
considering the advertisements and PR efforts for the STM32VLDISCOVERY.
Since their obvious goal is to get students, hobbyists and semi-professionals
interested in STM32 MCUs and to use them in designs it would be consequent
if it is their intention to allow free usage and distribution of the libraries.

The subject will only become relevant if someone is going to design a board and
release a support package that would include STM libraries or parts thereof. Looking
at the LeafLabs Maple project, it seems that they used some of the libraries to build
and integrate them into the modified Arduino toolchain (Maple IDE).

Should anyone decide to design a board based on a STM32 MCU and make the
project freely available (open source) and/or sell it including the libraries or code
based on the libraries then it seems advisable to ask STM for clearification
regarding the license in written form.

@robots: Yes, the STM32F103 used for the ST-Link interface is programmable, too.
However, once programmed with a different firmware I wouldn't know how to
restore the factory default firmware (ST-Link firmware). Do you know where it can
be found/uploaded from or how to save it?
Last edited by IPenguin on Wed Oct 06, 2010 12:17 pm, edited 1 time in total.
User avatar
IPenguin
Global Moderator
Global Moderator
 
Posts: 430
Joined: Mon Nov 16, 2009 3:16 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby robots » Wed Oct 06, 2010 1:26 am

IPenguin wrote:@robots: Yes, the STM32F103 used for the ST-Link interface is programmable, too.
However, once programmed with a different firmware I wouldn't know how to
restore the factory default firmware (ST-Link firmware). Do you know where it can
be found/uploaded from or how to save it?


I have this idea on how to "break" into locked flash, but never got the time to test it :) There is a bootloader, that can load some application into RAM, and it can also jump to any arbitrary location in memory. I would say, that small program that would read each byte of flash, and send it over uart would work :)

According to this:
http://www.mail-archive.com/openocd-dev ... 12724.html
You can reflash ST-link to work as Versaloon.  http://versaloon.com/index.html.
Versaloon works with OpenOCD, but SWD protocol is not ready yet.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby tayken » Wed Oct 06, 2010 1:47 am

robots wrote:I am just jealous, that IPenguin got it before I did. :-P


Me too. And the only board that is similar to this board is STM8S-Discovery. Of course there is the STM32 Primer2 but it is a little bit on the pricy side.
User avatar
tayken
Developer
Developer
 
Posts: 1507
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby hardcore » Wed Oct 06, 2010 3:16 am

I have this idea on how to "break" into locked flash, but never got the time to test it :) There is a bootloader, that can load some application into RAM, and it can also jump to any arbitrary location in memory. I would say, that small program that would read each byte of flash, and send it over uart would work :)



This was an exploit  tried in the 80's , many modern embedded chips now specifically prevent you from doing this, another trick is to load a program into the stack space as JSR's then force execution by wrapping the stack so that the next execution address is the stack.

If you are into  dentistry and have to do difficult extractions consider these as a good starting point

Skorobogatov, S.P. (2005) Semi-invasive attacks – A new approach to hardware security analysis.

and

Skorobogatov, Sergei P. & Anderson, Ross J. (2002) Optical Fault Induction Attacks.
Lecture Notes in Computer Science, Cryptographic Hardware and Embedded Systems, CHES 2002, http://www.springerlink.com.ezproxy.liv ... 1-JUN-2008


There are some good research works written by Skorobogatov

In China there are places in GuangZhou  that will 'decap' a chip for you and re-bond to allow the content to be read out.
hardcore
Jr. Member
Jr. Member
 
Posts: 84
Joined: Sun Sep 26, 2010 1:23 am
Location: Hong Kong

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby IPenguin » Wed Oct 06, 2010 6:30 am

In China there are places in GuangZhou  that will 'decap' a chip for you and re-bond to allow the content to be read out


Quite interesting, such technology was used in East Germany (Dresden) in the 70s and 80s to a) find out about the designs and b) gain access (read) the microcode definition/control tables of CPU chips (8080, Z80, 8088. microVAX etc). They got quite proficient in taking layer by layer of a chip off ... until they got the full mask design.

@robots: Thanks for the Versaloon links. The STM8S-DISCOVERY board uses the same STM32F103 for the integrated ST-Link as the STM32VLDISCOVERY board ... I'd have to tear my ST-Link adapter open but I am pretty sure it contains the same STM32F103 as well ...

I found a ST-Link firmware upgrade package ... it recognizes the ST-Link on the ST32VLDISCOVERY and asks if I want to upgrade the firmware despite the fact that the latest/same firmware is already loaded .. ;)

Reminds me of the Rigol firmware update ... and since I expect them to use VCP to load the firmware ... o.O

Questions are:

a) should I try it ... $10 wtf
b) will it flash the (latest) original ST-Link firmware after I have loaded Versaloon ... not sure if Versaloon is worth a try. We want the STM32F103 ST-Link firmware, right?
Attachments
ST-LinkUpgrade.jpg
Last edited by IPenguin on Wed Oct 06, 2010 12:19 pm, edited 1 time in total.
User avatar
IPenguin
Global Moderator
Global Moderator
 
Posts: 430
Joined: Mon Nov 16, 2009 3:16 am

Re: Low cost STM32VLDISCOVERY evaluation board - a first impression

Postby robots » Wed Oct 06, 2010 6:42 am

If you are windows guy, i wouldn't recommend changing the FW. You have all the right tools available.

I have ordered 2 of these kits, and I don't plan on using them in windows, as I don't use windows at all (some exceptions do apply (-: ). I will probably make sure that there is firmware that can be used in linux, with some, or almost none effort.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Next

Return to General discussion