Safety rules

The boards comprising the Embedded System (ES) development sets used in the laboratory need to be handled with care to avoid mechanical damage and electrostatic discharge (ESD) problems. Therefore, a number of additional safety precautions need to be observed:

  1. Before the board is touched one needs to remove extra charges accumulated in the body and clothes by putting both hands on a grounded conducting element (e.g. refrigerator). Especially, one need to perform grounding procedure after taking off a wool sweater.
  2. The development set must be connected BEFORE the power is turned on.
  3. Under no circumstances it is allowed to place the boards on a conducting surface, such as the foil the boards are usually wrapped up in, or the metal box enclosing the set. 
  4. The devices should be assembled in the following order:
    1. Connections in the ES development set.
    2. Connections in the PC or notebook.
    3. Additional power supply, if needed.
  5. ES development sets need to be returned neatly packed with cables rolled up. 
  6. The whole group will be held responsible for any damage to the devices they used in the classes.

Project requirements

In order to successfully pass the laboratory of Embedded Systems it is necessary to design and implement an application for arbitrary embedded system using (arbitrary) high-level programming language (C or C++ preferable due to prevalence in the industry). The example project topics are listed below. By no means the list should be treated as complete or compulsory. Individual ideas are welcome and highly appreciated. Similarly, one does not have to limit himself to the devices available in the lab - it is possible to use own ES set. 

The projects are realized in 3-person groups with a selected team leader.

Evaluation :

  1. Difficulty level In the final grade, a multiplication factor is applied. If a group fails to incorporate one functionality, the final result is multiplied by 6/7. If a group implements an additional functionality which is planned in the proposed schedule the final result is multiplied by 8/7. Should a group plan to incorporate an additional functionality, but fails to implement it, the result is multiplied by 7/8.
  2. Program evaluation according to the assumed schedule. In order to obtain the maximum grade, all the planned functionalities must be implemented.
    If a group decides to change the plan after the deadline for schedule presentation, the grade is lowered.
  3. Implementation correctness - whether the program operates without errors or flaws.
    The delivered program must compile.
  4. Code readability. Consistent indentation, comments, meaningful variable and function names, limited length of functions and procedures (unless there is a justified reason to use longer functions), etc.
  5. Team work. It is verified if all group members actually participated in the project. The grade is lowered if some members seem not to have contributed to the project (see also the comments regarding the project report).
  6. Keeping the deadlines - each missed deadline lowers the grade by 0.5.  The dates given in the table are the hard deadlines (each task can be completed earlier, but not afterwards):
      Task   Deadline  
    1. Choosing the project and delivering the schedule   2nd meeting  
    2. Mid-term checkpoint   7th meeting  
    3. Project delivery with complete documentation   13th meeting  
    The deadline for Task 1 is understood as the end of ES lab classes on that day. In the other cases the deadline is 08:00, i.e. by 08:00 the appropriate files need to be uploaded to the moodle platform. --> The schedule needs to incorporate the description of individual tasks and when they will be completed. It is insufficient to write just the task name! An example (minimalistic) schedule is given here.
  7. Quality of documentation.
  8. Bonus for student project idea.

Final report

In addition to the general guidelines of creating documentation, the following aspects should be covered:

  1. The description of extra hardware incorporated by the group together with datasheets (in separate files) and explanation of design choices. If a group does not introduce own hardware, it must be stated explicitly.
  2. The functionality description of incorporated elements, e.g. for digital inputs and outputs of LPC one should specify PINSEL (in the applied range), IODIR, IOSET, IOCLR, IOPIN; the same for other functionalities [UART, SPI, I2C, PWM, ...], interfaces [display, MMC/SD card, Extender, network card, accelerometer, ...],and interrupts (those that are used, for LPC2xxx - FIQ,VIRQ,IRQ). The description should cover MCU and peripheral registers, not the library functions. If a group incorporates in the program unused functionalities (e.g. after modifying examples), they also need to be covered in the documentation.
  3. Clear specification of the incorporated functionalities.
  4. Example documentation can be found here.

The point "team work" should cover the duties and responsibilities of each group member.

The final report (but also the checkpoint files) should be uploaded by the team leader to the moodle platform together with:

How to succeed?

The chances of successful completion of the project increase if:

  1. You start working on the project right away at the first class (not halfway through the semester).
  2. The responsibility for implementing functionalities is distributed among different team members (e.g. Member 1: diodes, buttons, Bluetooth; Member 2: LCD, joystick; Member 3: UART, memory).
  3. You come prepared, i.e. appear in the class already familiarized with the specific technology or device (documentation and code samples analyzed), bring preliminary code snippets to test in the lab, etc.
  4. You start working on more involving functionalities early enough.

How to fail?

The chances offailure increase if:

  1. You start working on the project with delay (not from the first class).
  2. Everyone does everything.
  3. You come unprepared (begin thinking of the project during the class).
  4. You leave the hard stuff for the last week.
  5. You spend to much time on things not related to the project itself, e.g. preparing programming environment, configure different platforms, etc.

Helpful literature

In order to familiarize oneself with the programming concepts of LPC2000 family of microcontrollers, one may look into The Insider's Guide to the Philips ARM7-based Microcontrollers, or The Insider's Guide to the NXP LPC2300/2400 Based Microcontrollers (registration required). In Polish, one may refer to the book Mikrokontrolery LPC2000 w przykładach (Emil Stawski) [available in the Institute's library].

Other

O'Reilly Programming Embedded Systems With C and GNU Development Tools 2nd ed. Oct.2006
Building Bare-Metal ARM Systems with GNU
Description of LPC microcontrollers (user guides, datasheets)
Initialization code generator for MCU with the ARM core

Development tools

It is recommended to use the development environment and tools installed in the laboratory. Below you will find the list of tools for those wishing to set up the environment at private computers.

Compiler, linker, etc. (toolchain)
GNU #1 "Files" section. Version compiled with eabi#0
GNU #2 "Files" section. Version compiled with eabi#0
Occasionally, the page is redirected to yagarto project.
Version installed in the laboratory Set appropriate paths!!!
In the system, only ONE version of the cygwin1.dll library is permitted.
yagarto Version compiled without eabi.
www.codesourgery.com Reference compiler version (installed in the laboratory). Compiled with eabi#5.
In all the cases, one must install version big endian and libraries to the thumb mode.
Additional tools (program make and utilities)
cygwin Front-end of Linux ported to MS Windows. Version prepared for the ES laboratory can be found here - one only needs set the paths. It is recommended to place cygwin directly in the main drive. In any case, the folder name must not contain spaces.
cygwin version lite Remember about the cygwin1.dll library.
Freddie Chopin version Version not requiring cygwin libraries.
Eclipse
Eclipse Lab version of Eclipse (with all the requirted drivers). Workspace can be found here.
VirtualBox
VB The archive contains disk image. After unpacking you need to:
  • set the swap file,
  • move appropriate USB devices to the virtual machine environment
  • launch.
Operating systems (not really indispensable)
System Embedded Artists Example programs prepared by EmbeddedArtists use the indicated system.
www.FreeRTOS.com Free OS. Educational program for 2148 microcontroller ported to the system in version 5.1.1 can be found here. Executing the «thumb» or «arm» loader will create appropriate image for the microcontroller if «make» utility is installed properly.
ChibiOS/RT Very good (and small!) OS for microcontrollers with the ARM core.
CooCox OS Very good (and small!) OS for microcontrollers with the Cortex core.
Salvo OS Compact OS for microcontrollers with Cortex and ARM7TDMI cores.

Drivers and utilities


Example project topics

The project should incorporate communication between different devices, e.g. PC, PDA, mobile phone (WM2003, Symbian, etc.), but it is recommended to incorporate an ES development set. Different groups may choose the same project topic, but it must be implemented on different devices.

Common materials for ES based on the ARM microcontrollers

Example programs for EA RTOS 2.2 (all types of devices)
ADC adc.zip
Code Protection (protection against reverse engineering) code_protection.zip
In-Application Programming (flash programming through application) iap.zip
UART through IRQ and polling uart_poll.zip
uart_irq.zip
I2C in master mode without interrupts, example application to read and write eeprom i2c_poll.zip
SPI in master mode with and without interrupts spi_poll.zip
spi_irq.zip
SWI software interrupts and handler swi.zip
handling FIQ install_fiq_handler.zip
handling IRQ in the SYSTEM mode (instead of the IRQ mode) irq_in_sys_mode.zip
Change of PWM parameters pwm_freq.zip
pwm_duty.zip
Clock interrupts and handlers timer_irq_arm.zip
timer_irq_thumb.zip
Delay measurement using timer (with and without interrupts) timer_delay_poll.zip
timer_delay_irq_arm.zip
timer_delay_irq_thumb.zip
Power Save mode (to conserve energy) idle_mode.zip
Power Down mode (if the board is battery powered) power_down_mode.zip
Real-Time Clock rtc.zip
Watchdog watchdog.zip
NXP sample programs with NXP
MP3 player sample programs with NXP
CAN in full mode sample programs with NXP
uIP stack uip-1.0.tar.gz
Book examples lpcwp.zip
Example programs for LCD lcd_lpc.zip
SD/MMC card access
Documentation for communication between LPC2K MMC/SD cards
Description of MMC/SD cards and related instructions
Other documentation for MMC/SD cards
Code sample for reading/writing MMC/SD cardssolution dedicated for ARM microcontrollers
One more documentation sample for MMC cards (together with the description of FAT)
Sample code for SD card access in RDF file system for LPC 2138/LPC2148 (Public domain)
User's guide local copy

You can find description of the available equipment here.