Introduction

Kit MCBSTM32E introduces Cortex-M3 family, allowing you to create some simple examples to start playing around with this microcontroller. This kit has the following feautres:

For programming or debugging of out Starter kit one need the JTAG Ulink (This little board connected on ST Kit)

Samples presented in this tutorial

Keil Development tool

The Keil ARM compiler integrated with the Keil IDE uVision become (IMO) the most complete development environment for ARM processors, compared to other open-source solutions. The following are most important: 

The video below show how to open a Keil project

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Video of the ST board alive.

Creating and debugging projects

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

First sample, Blink Leds

This sample show how to configure the PORT direction to output, note that in this sample we use an hand coded "delay" routine to spend some cycles.

Using Timers

Now we're going to use the timer interrupt, to create the LEDs turn-on/off time delay. In Cortex M3 the interrupt vector has fixed positions, defined in the startup file (STM32F10x.s). So all we need to do is add our interrupt routine name in the startup file, in the right positon, that whenever there is an interruption, our routine (TIM1_UP_IRQHandler) will be called automatically, our only job is to define it's code.

Our code...

Graphical Display and A/D

In this example we show the value read from A/D in the graphical display, Keil provided the libraries to work with this display. Just insert in your project the following files. 

To initiate the display

Sending some text

Now for reading the A/D it's simple, just configure the A/D hardware, and verify when the conversion ends.

Now reading the A/D conversion value

Keil RTOS (RTX)

RTX is actually a real-time embedded operating system for ARM processors, with it you can break the problem into tasks that will be executed following some rule of schedule. With an RTOS we can define:

That's how we create a RTX project

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Mailbox

The mailboxes are mechanisms which information is exchanged from one task to another.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player