This STM32 computer looks awesome

IF you have STM32 microcontroller board and wandering what it is capable of then you should check out this fully autonomous computer. Its brain is SMT3210E-EVAL board based on STM32F103ZET6 ARM Cortex-M3 microcontroller. Computer supports PS/2 keyboard input and outputs stream to VGA display. Since generating VGA chews significant amount of resources there is a Propeller microcontroller dedicated for this.

Other features include: 1MB of external RAM, TCP/IP with ENC28J60 Ethernet to SPI bridge, wireless interface with nRF24L01 chip, microSD storage, connector for extension boards like ADC, SPI, I2C, UART, CAN etc. and PWM based simple sound. Computer is capable to run eLua sources with many cool apps base. Source files can be run from storage or simply edited directly inside built-in browser. Probably hard to mention all features of it so video should be pretty self explanatory.

Getting touchscreen working with STM32

Andy Brown have written a nice tutorial on how to implement and program resistive touchscreen controllers. He took screen with ADS7843 – standard and cheap resistive touch controller. Mastering it you will be able to do same with many other compatible controllers like UH7843 or XPT2046. Controller can uses SPI interface to talk to microcontroller.

Before he started programming it seemed that it should be very easy to read values form controller AD converter and interpret it as coordinates. But it turned out that things are more complicated as it looks in the beginning. Main problems rise due to noise and AD reading variation. In order to make touch precise some processing has to be done like smoothing multiple samples and rejecting bad convertions at the beginning. Anyway finally Andy worked out an algorithm that allowed to read touchscreen coordinates using STM32plus and do some basic stuff like drawing on screen.

USB oscilloscope using STM32

This is a basic oscilloscope on STM32F103C8T6 microcontroller. Circuit board is kept very simple. No any fancy analog stuff – just diode protection circuit and resistors divider. It is a two channel 8-bit scope with 300kSps each. It accepts voltage levels from 0 to 6.6V.

Data stream via USB is live and goes to PC GUI called miniscope v4.Here you have some basic controls including sampling rate, triggering source and level, buffer size and other handy stuff.

Running FreeRTOS on STM32

Bigger scale microcontrollers like STM32F103ZET6 are stuffed with lots of features that enable to run complex project. Practically it is advised to stick with some RTOS to keep project modular and maintainable. FreeRTOS doesn’t take much of processor resources but benefit a lot like allows parallelize functions/tasks with ease. Scienceprog takes us through process of building simple applications by using FreeRTOS on STM32 microcontroller.

Each task here is programmed individually without worries how it will be run, because while writing each it is supposed that all processor resources are available. And this is so because each task is managed by scheduler which takes care of business. From point of view everythink looks run like parallel tasks while in reality each task is performing in turn according to their priorities set. In following demo there are 5 tasks running: LED flashing, Button check, Button LEDs toggle, LCD and USART. Keep in mind that also there is always an idle task running that is created once scheduler is run. This is a great template to start with as it is a bit different from official FreeRTOS demo which is more generic.