No announcements

For the last part of the semester the honors section will be building a simple system using off-the shelf components consisting of an ARM cortex-m3 based board from ST Microelectronics, a UART, and a simple LCD display from a Nokia Cell phone. This is described in greater detail in this document (this document will be revised as we go along).

  1. The first experiment requires compiling and downloading a simple blinking light demo; and then modifying this code to use a pushbutton and second LED.
  2. In the second experiment you will interface to a UART using polling and interrupt-driven implementations. Also, you will use a Saleae Logic to examine the serial protocol.
  3. In the third experiment you will interface to a Nokia LCD screen using the SPI protocol. This will require the use of the Saleae Logic to understand the communication protocol.
  4. Finally, you will build a simple "terminal" application

Documents

  1. lab manual
  2. Discovery Board Users Manual
  3. STM32 Programmers Manual
  4. STM32F100xx Reference Manual
  5. STM32F103xx Reference Manual
  6. Logic Guide
  7. LCD Datasheet, code examples

Lab 1

  • Download Lab1.tar and untar the files in a convenient location.
  • Go to the directory Lab1/BlinkingLight and "make" the executable
  • Connect a USB cable between your computer and the discovery board
  • In a separate window, execute
    /l/arm/codesourcery/bin/st-util 44444 /dev/stlink
  • Execute gdb
    /l/arm/codesourcery/bin/arm-none-eabi-gdb BlinkingLight.elf
    (gdb) target extended-remote :44444
    (gdb) load
    (gdb) continue
  • Now extend the code to watch the state of the user pushbutton and reflect that state in the second LED -- all the necessary documentation is in the lab manual and the Discovery board users manual
  • Interface the UART shown above (read the lab manual for details) and implemented putchar/getchar using polling. Your program should print "hello world\n" and then echo any received characters.
  • Test using "screen /dev/ttyUSB0" on the host.
  • Connect the Salaee logic to the gnd, tx, and rx signals of the UART and capture data for the serial protocol.

Lab 2

  • Interface the LCD as described in the lab manual. You can find additional information (and example code) Sparkfun link
  • Write a program to display text typed in "screen" on the LCD
  • Modify your program to allow scrolling up/down in a text buffer -- you'll need to have a timer tick update the display to match the current view into the text buffer. Also, you'll have to look for the appropriate ascii up/down characters.
  • Display a graphic of your choosing