#9 HAL for MINI STM32 dev board

This section describes how to run eCos on the MINI STM32 development board. The MINI STM32 board features:

- CPU: STM32F103VET6 (512KB FLASH and 64KB SRAM)
- JTAG debugging interface
- RS232
- USB2.0 SLAVE interface mode
- Micro SD(TF)
- 2.4 inch TFT 240X320 with touch screen interface
- SST25VF016B (16MBits) serial flash (SPI)

I. Literature:

- Main board schematic.
- LCD module schematic.
- STM32F103VET6 reference manual.
- ILI9325 LCD controller manual.


The HAL is based on the STM3210E EVAL Development board HAL. Most of the peripherals are supported in the eCos public CVS repository (USB, SPI, ADC etc..). Support for the SST25VF016B SPI flash is also available from eCos CVS. The eCos Mass-Storage test applications described here is successfully tested on the board ( ecos.ecc example ). To test the SPI flash device, configure and compile eCos as following:

$ mdkir mini_stm32
$ cd mini_stm32
$ ecosconfig new mini_stm32 default
$ ecosconfig add flash -> to test the SPI flash
$ ecosconfig tree
$ make
$ make -s tests IGNORE_LINK_ERRORS=y

III. Framebuffer:

A framebuffer device driver package is available from open-etech bitbucket for the ILI9325 LCD controller used on the MINI STM32 board. The LCD is a 240x320 display. The ILI9325 package supports both orientation with 16-bits colour representation. The eCos framebuffer test applications described here are compiled as follow, the display being configured in 240x320 or 320x240 mode:

$ ecosconfig new mini_stm32 default
$ ecosconfig add framebuffer -> configure FB0
$ ecosconfig tree
$ make
$ make -s tests IGNORE_LINK_ERRORS=y

The ILI9325 framebuffer device package relies on a plaftorm specific pakage providing access to the LCD controller. The MINI STM32 uses the i80 system interface with 16 bit bus width to access the ILI9325 device. Following is a screenshot of the MINI STM32 board running the fbmacro eCos test application:

IV. Touch screen

The MINI STM32 is delivered with a TSC2046 touch screen controller accessible over the SPI interface. To test the touch screen driver, include the following packages:

$ ecosconfig new mini_stm32 default
$ ecosconfig add touch_tsc2046
$ ecosconfig add touch_mini_stm32
$ ecosconfig add fileio
$ ecosconfig tree
$ make
$ make -s tests IGNORE_LINK_ERRORS=y

V. OpenOCD 0.4.0:

Configuration files to use with the Bus Blaster V1 adapter:
- Interface
- Target
- Board

To erase and program the internal flash:
>telnet localhost 4444
$ reset halt
$ flash probe 0
$ stm32x mass_erase 0
$ flash write_bank 0 flash.bin 0
$ flash write_image erase flash.bin 0x08000000 bin