µTasker Forum

µTasker Forum => STTM STM32 and STR91XF => Topic started by: mark on July 07, 2010, 03:43:12 PM

Title: STM32 Preliminary Information
Post by: mark on July 07, 2010, 03:43:12 PM

The STR91XF project was never very successful due to lack of users and lack of interest. The STR91 was fast and had large amounts of memory when it was first introduced but it was rather difficult to use and had its fair share of bugs and ragged edges...

I expected that the ST STM32 series would consist of a Cortex M3 core bolted on to the same STR91 peripherals but how wrong can one be... The peripherals are all new (at least in comparison to the STR91), the FLASH is nice to use (1k or 2k granularity), the chips (the connectivity series are the ones of main interest) are packed with communication interfaces: 3USARTs, 2 UARTS, 3 SPIs, 2 I2Cs, USB device/OTG and Ethernet. The Ethernet controller is rather special since it can also perform check-sum offloading of IPv4 and IPv6 frames which can greatly improve efficiency of IP protocols and routing applications.

So I couldn't resist the temptation and, using STM32F107VCT on the STM3210C-EVAL board http://www.st.com/mcu/contentid-100-110-STM3210C_EVAL.html, a basic port was performed.

My feeling is that the STM32 has a bright future and my first experiences with it were mainly very positive.

For anyone who has already been contemplating the use of the STM32 Cortex M3 based devices or have the evaluation board mentioned above, a demo has already been made available. It makes use of the 3.2" color TFT on the board to allow a new "Picture Frame" application from the micro SD card on the board. In addition is includes the standard IPv4 stuff (web server from internal FLASH or SD card, FTP, TELNET etc...).
Below are details with a simulator executable and binaries for immediate evaluation.

Good luck!




I am now happy with the state of the first STM3210C-EVAL demo project so I have made a quick release version which can be tried.
These are the files:

The first is the STM32 simulator. This can be extracted and executed by double clicking the EXE file – it doesn’t need any installation!. The PC must have WINPCap installed (any PC with WireShark on it will already have this!)
COM1 is used as USART2 so a connection at 115k Baud to a terminal emulator will allow it to be used. The Ethernet needs to be configured by selecting “Select working NIC” in the LAN menu when it has been started and then it can be contacted from the network (either from the PC it is running on and/or any other in the sub-net) at The IP config can be reconfigured via USART2.
In the folder there are two configuration files FLASH_STM32.ini and SD_CARD.bin. These contain the content of the 256k internal FLASH and a simulated SD card. I have set these so that there are web pages in the internal FLASH and the correct directories on the SD card with a few pictures etc. If these are deleted, the simulator will start with empty SD card and FLASH.

The simulator has a special feature so that it can be started with SD card inserted or not:
1) If you just run it, it will not have NO SD card inserted and the demo will be from internal FLASH and the TFT demo is a simple mono-chrome emulation demo.
2) If the port E-0 (this is the SD card detect input) is toggled so that it is ‘0’ (within 2s of the simulator starting – click on the port bit in the simulator) it will detect the SD card and work with it. In this case it will perform a slide-show of the photos in the directory “pics” and the web server will work with web pages in the directory “dir1”.

uTasker_STM32_Target.zip contains Bin and SREC files (I don’t know which is easiest for you) so that you can load the code to a real board. In this case the TFT pin 29 needs to be removed (it can be bent so that it no longer connects and be straightened again later should this be required (I have done it and it is OK)). The operation is the same as the simulator although the images display faster than when simulated.
The SD card needs to be inserted on reset and then it needs 2 directories (“dir1” and “pics”). The first is used by the web server (start side is index.htm). In fact you can copy big web server content to this directory and the files can use long file names when copied in a PC – if the files are copied to the SD card via FTP only short file names can be written though.
In “pics” you can put BMPs. These should be 320 x 240 in 24 bit color format and not compressed. They can be smaller but will then not be full screen. They should not be larger otherwise they will not be recognized and stop the slide show. If there are no photos the TFT will display a blue screen and do nothing…

The file content can be viewed via FTP or in the file system menu (DOS-like) via USART2 or TELNET.

web_pages.zip contains the web pages that I loaded to internal FLASH. These is a bat file in the directory which will automatically copy them all via FTP to the board. Remove the SD card and reset to work with the internal file system from FLASH. The web sides allow a number of things to be done, like configuration, dynamic web content generation, images to be loaded to the web server and to the TFT, plus images from the TFT (only when SD card mode not used because the MISO line is missing and so the TFT contents cannot be read), as well as sending emails. There are also a couple of test images for the SD card there (same as loaded in the simulator config files).

There are quite a lot of details and quiet a lot of features so you may need to spend a few minutes experimenting. You can use an existing tutorial as help too, eg. http://www.utasker.com/docs/M5223X/uTaskerV1-4_M5225X.PDF

Note that the serial interface configuration web page doesn’t work from internal FLASH but does from the SD card. I set this up incorrectly for the internal file system and will correct it later. The web content has been rather thrown together to have something quickly, so improved web pages will be worked on later. On the SD card one can make huge web server content which of course can look very impressive but I simply put one page there to get started with.

The demo occupies about 95k FLASH and about 25k SRAM so there is a lot of space still for additional applications.

Title: Re: STM32 Preliminary Information
Post by: mark on July 11, 2010, 12:03:28 AM
Hi All

I have had a go at making a first video demo: http://www.youtube.com/watch?v=2Rbz1SOoJVI