Category Archives: ARM microcontrollers

Abour ARM7, LPC2000, ADuC microcontrollers.

FreeRTOS on STM32

High density line of STM32 microcontrollers have quite a bunch on features that can be used in user programs. The more features you add to source the more complicated program becomes and this way it starts to be difficult to keep up with all things. Using only main loop and interrupts becomes time consuming task to manage. If you don’t want to struggle in tuning things up manually you can use one of many real time operating systems (RTOS). They are great when you need lots of separate functions to run in parallel so no task would be missed. RTOS scheduler takes care of giving each task a decent time to perform. There are lots of great RTOS systems around. Many of them are free and opensource.

It happens so that I love using FreeRTOS which has quite long history and is flexible enough to fit multiple types of hardware. You can check out my recent demo on Atmega128. I encourage you to give a try to other RTOS systems like ChibiOS, BeRTOS, and many more. But lets stick with FreeRTOS. Simply speaking FreeRTOS is quite simple and easy to use. It has practically most of features you’d look for in RTOS. Some of key features would include preemptive, cooperative and hybrid scheduler, task and co-routine support, queues, semaphores and mutexes for task synchronisation and communication. Many demos, many ports to to get started with. Continue reading

Driving Graphical LCD with STM32F103ZET6

STM32F103ZET6 board comes with 3.2 inch graphical LCD which features an ILI9320 controller. Equipped LCD is capable of displaying 252144 colors when driven in 18-bit mode. We are gonna drive it in 16-bit mode, so we are limiting it to 65K colors.

LCD driver is based on existing code found on internet which was originally developed for STM3210E board. Only minor modifications were needed like assigning right control pins. Continue reading

Connecting STM32 USART to standard I/O streams in GCC

In many situations when working with STM32 microcontrollers you will want to output text strings. There is no need to write special functions that output specially formatted strings as it is hard to keep up with various cases. Simply speaking it is convenient to use standard I/O streams and its library functions that allows sending formatted data streams.

Arm GCC toolchain comes with newlib C library from Redhat and so it isn’t specially designed for embedded toolcain. In order to use stdio functions we have to take care of several syscals so called “stub functions”. These functions normally are provided by operating systems like you would write C programs in Windows or Linux. In our case we aren’t using any OS, os in order to avoid error messages while compiling we have to provide these function declarations where most of them are dummy implementations. It’s not something new pick one that you find on internet. I found on that was written for STM32 Discovery. Continue reading

Interrupt based button read on STM32F103ZET6 board

In previous example we implemented a simple demo program that reads buttons by constantly checking their status in main program loop. Obviously this isn’t efficient and convenient way to do that. Imagine your program has to do lots of tasks and in between you also need to check button status – mission becomes impossible unless you use interrupts. In this part we briefly introduce to STM32F10x interrupt system and write example code where LEDs and buttons are serviced within interrupts.

ARM Cortex-M3 microcontrollers have advanced interrupt system that is pretty easy manageable. All interrupts are controlled inside Nested Vectored Interrupt Controller (NVIC) which is close to Cortex core to ensure low latency and robust performance. Main features of NVIC include: Continue reading

Implementing buttons on STM32F103ZET6

Last time we have made a good starting point with setting up a project template for STM32F103ZET6 development board using GNU tools. Using same project template we can move forward and start programing other elements. This time a quick note about adding button library. This is really modest implementation which simply initializes port pins and then reads their status.

Development board is equipped with four user programmable buttons named WAKEUP, TAMPER, USER1 and USER2. We are not going to care about meaning of names just use them as general purpose buttons for now. Continue reading

Driving LEDs with LPC2148 microcontroller

Couple years ago I have purchased LPC2148 development board called BlueBoard form ngxtexhnologes. It is quite powerful board with ATM7TDMI series microcontroller which is considered an old guy comparing to Cortex ones. But still these are widely used and are powerful.

Development board has some handy features installed. 12MHz crustal allowing to run processor at full 60Mhz speed. Couple RS232 ports, VGA connector, PS/2 connector for keyboard or mouse, 20-pin JTAG, SD/MMC slot, USB B-type, 8 LEDs driven with serial-in parallel-out shift register, 2×16 LCD, buzzer, audio jack with amplifier, two programmable buttons and 256Kb of I2C interfaced EEPROM. Microcontroller itself has 512KB of internal flash and 32+8KB of RAM. All ports are accessible and any external hardware can be disconnected with jumpers. This is great board for prototyping and end application. Continue reading

LED blinky demo on STM32F103ZET6 development board

Found some time to play with STM32F103ZET6 development board and decided to set up a simple project for it. Probably the trickiest part of this is to set up a project environment that would serve as template for following developments. Obviously we choose GCC development tools. Many ARM developers chose CodeSourcery Lite edition toolchain. It has full command line functionality – this is what we usually need. If you want some alternative – you can choose Yagarto GNU ARM toolchain which is also great and free.

No matter which tool you select code will work on both. Lets stick to CodeSourcery. Just download it and install to your PC. As we said Lite version supports only command line tools – we need an interface for it. Eclipse IDE is one of favorite choices, so we will grab this one too. Yagarto website has a nice tutorial on how to setup Eclipse IDE in step-by-step manner. We wont go in to details with this. Continue reading

New STM32F103ZET6 development board with 3.2″ TFT Touch LCD

New development board have just arrived. Thought it would be nice to push things more towards ARM cortex-M3 playground.

Continue reading

New LPC1768 based development board

Continuing with its endeavor to deliver low cost micro controller hardware development platform, NGX has now launched a new low cost prototyping platform for LPC1768 series of mircocontrollers. LPC1700 are ARM cortex-M3 based micro controllers. The platform is named BlueBoard-LPC1768-H and costs only $32.5

BlueBoard-LPC1768-H is a breakout board for LPC1768 cortex-M3 based microcontroller. The LPC1768 microcontroller has 512KB of internal flash and 64KB RAM. Ethernet MAC, USB Device/Host/OTG interface, 8-channel general purpose DMA controller, 4 UARTs, 2 CAN channels, 2 SSP controllers, SPI interface, 3 I2C-bus interfaces, 2-input plus 2-output I2S-bus interface, 8-channel 12-bit ADC, 10-bit DAC, motor control PWM, Quadrature Encoder interface, 4 general purpose timers, 6-output general purpose PWM, ultra-low power Real-Time Clock (RTC) with separate battery supply, and up to 70 general purpose I/O pins

Board can be purchased from http://shop.ngxtechnologies.com/product_info.php?cPath=21&products_id=65

Following are the salient features of the board.
* Dimensions: 94.08×54.48 mm2
* Two layer PCB (FR-4 material)
* Power: USB powered or can be powered through the DC jack, 5-7.5V input
* reset switch
* Test LED
* 32Khz crystal for RTC
* On board 258kb I2C EERPOM
* Extension headers for all microcontroller pins
* USB B-type connector for powering the board
* 20pin – JTAG connector

Low cost and open LPC2148 development board launched

NGX Technologies Bangalore, has launched a very low-cost and feature rich ARM7 evaluation/educational board. The product is named ‘BlueBoard-lpc2148’ and is based on the popular LPC214X series of ARM7 microcontrollers from NXP semiconductors. BlueBoard is an open-source initiative at realizing cost effective prototyping and solutions. Driven at present, by engineering and support from NGX Technologies, the board is provided with necessary interfaces for a quick realization of embedded solutions. Developed to evaluate the LPC214x series of processors, the board acts as a perfect platform to create and test your embedded applications. More details can be found at http://code.google.com/p/blueboard-lpc214x
http://shop.ngxtechnologies.com

BlueBoard_small

The board is attractively priced at USD 42 Continue reading

New on WinAVR Tutorial New on WinARM Tutorial