INSTRUCTOR and TA

    Md Jahidul Islam. Office Hours: Friday 4:00 PM - 5:30 PM. @LAR-339D.
    Lecture: M/W/F 4:00PM-4:55PM @LAR-0340
    TA: TBD

COURSE PREREQUISITES

    EEL 4744C with minimum grade of C
    Fluent in C and assembly programming
    Proficiency in Python programming

Textbooks

    Real-Time Operating Systems for ARM Cortex-M Microcontrollers (4th Edition).
    By Jonathan W Valvano. ISBN-13: 978-1466468863, ISBN-10: 1466468866.

Hardware and Software

    TI Tiva C Series LaunchPad
    TI SENSOR Booster Pack
    TI BeagleBone Black Board
    IoT Development Board (with LEDs, LCD touch display and joystick)
    TI Code Composer Studio 11
    Beagle-Board firmware image
    Some relevant libraries and source code (will be provided in class)

Sample Projects


Tutorials and setup


Course Materials


Week 1
Course Introduction
• ARM Architecture and OS overview • CCS overview; contents of lab1 and lab2
Week 2-3
Diving Deeper Into ARM Cortex M4
• Instruction set and memory model • Board support packages; LED driver interfacing • Thumb2 instruction sets; unified assembly programming • Programming and linking between C and assembly • BTIVA C series overview; contents of lab2 and lab3
Lab 1: Introduction and Setup
  • Part A: Blinking the LEDs on-board the Tiva Launchpad
  • Part B: UART initialization, reading outputs on the CCS console
  • Objectives: In this lab, you will blink LEDs on the Tiva Launchpad. You will also output messages using the UART module on the microcontroller and begin using the serial console embedded in the Code Composer Studio (CCS) IDE. The purpose of this lab is to get you used to the IDE, the microcontroller datasheet, how to build and flash programs into the microcontroller, and attain a response from it
Lab 2: Basic Interfacing, Linking, and Communication
  • Part A: Interfacing LED drivers, I2C communication
  • Part B: Linking assembly functions to drive the LEDs
  • Objectives: In this lab, you will be creating I2C functions to utilize the I2C modules on the Tiva TM4C123GH6PM and using it to interface with sensors on the sensor booster pack. You will output these values and display them on a console (in CCS) using UART communication, and then use timers so that these values and messages are shown at specific rates.
Week 4-8
RTOS Components &
• Threads, interrupts, and schedulers • Process: from OS to RTOS • Inter-process communication (IPC) • Implementing ICP in your G8RTOS • Avoiding Deadlocks • Locks and semaphores • Yielding, blocking, sleeping, etc. • Periodic and dynamic threads • Contents of lab4 and lab5
Lab 3: G8RTOS Scheduler and Synchronizers
  • Part A: Setting up BSP, drivers, and OS structure
  • Part B: Threads, exception handlers, and schedulers
  • Part C: Semaphores & peripheral controls
  • Part D: Threads for Sensor Interfacing
  • Part E: Putting it all together with LED and sensor modules
  • Objectives: Real-time operating systems (RTOS) are a fundamental part of embedded systems. They guarantee that certain blocks of code will run by using a very robust flow and allocation of execution time to different parts of a program that may not be guaranteed with sequentially-designed code. The main objectives of this lab are to implement multiple threads for dedicated tasks, a scheduler for these threads, and a simple spin-lock semaphore primitive for synchronization.
Lab 4: G8RTOS Periodic Threads and Queueing
  • Part A: Improved Semaphores, Blocking, & Yielding
  • Part B: Priority scheduling, periodic and background threads
  • Part C: Implement FIFOs
  • Part D: Putting it all together for sensor functionalities
  • Objectives: One of the core features of an RTOS relates to the utilization of threads. This requires an interface between system-level controls, such as the stack pointer, which is provided by select assembly functions. One must consider however when a few key things in making the threads work as we want to. The main objectives of this lab are to implement more fine-tuned control over the threads to enable them to communicate between each other, as well as give us hard guarantees of the scheduling order of threads. You will build upon what you have learned in lab 3.
Mid-term
Exam
Mid-term Exam: 8th week Friday (an in-class written test)
In-lab quiz #1: 9th week in your regular lab times
Week 9-10
Advanced RTOS Concepts &
• More on dynamic and periodic threads • Inter-process communication • Thread priority: FIFO, round-robin • Aperiodic Event Threads • Networking Basics: OSI model • IPv4/IPv6 and TCP/UDP concepts for RTOS • Hands-on embedded networking concepts • Contents of lab6 and lab7
Lab 5: G8RTOS IPC, Dynamic Threads, Priority Scheduling
  • Part A: Implementing Blocking, Yielding, Sleeping, Priority
  • Part B: Implementing Interprocess Communication (IPC)
  • Part C: Dynamic threading, Aperiodic and Periodic Events
  • Part D: Interfacing TFT Display, Joystick
  • Part E: Putting it all together for sensor functionalities
  • Objectives: In this lab, you will learn how to interface a (remote) communication protocol with RTOS. Several systems, including standard video surveillance cameras, remote inspection drones, and doorbell cameras have very similar applications. For a simplified setup, you will use your laptop to stream a message through the (wired) network to your BeagleBone. Then, we will perform on-device data generation and interface the output on your multimod daughterboard. The output will then be displayed on the LCD screen.
Mid-term
Week
The mid-term exam will be in-class(the only paper-based exam)
• Lab quizzes will be in regular laboratory schedules
Week 11-13
Real-time on-device AI/AIoT Topics
• Embedded AI and on-device ML/vision concepts • Running AI inference models on Beagle boards • Integrating RTOS and AIOT • Audio signal processing overview • Image/video processing overview (OpenCV tutorial) • Sample projects and implementation do/donts
Week 14 - *
Specific project-based contents; sample projects:
• Games: Snake game, Tic-tac-toe, Sudoku, Atari, Tetris, etc. • AIoT: security system, sensory data logger, traffic simulator, etc.
Lab 6: Audio Signal Processing & Recovery
  • Part A: Dominant Frequency Detection
  • Part B: RTOS integration and interfacing
  • Part C: Real-time DSP and RTOS integration
  • Objectives: In this lab, students will integrate Real-Time Operating Systems (RTOS) for Digital Signal Processing (DSP) using provided libraries and procedures to develop an efficient, real-time audio I/O application. Tone detection plays a vital role in digital signal processing, particularly in real-time audio applications such as DTMF. The Goertzel Algorithm is commonly implemented on resource constrained devices for this purpose. This lab focuses on utilizing this algorithm to analyze the frequency components of audio signals, process them in real-time, and provide visual feedback on the display. This lab will also build on the topics from prior labs to simultaneously output tones via an onboard DAC based on user input.
Final
Assessments
Individual work: a game or sensor (details will be discussed in class)
In-lab quiz #2: 13th week in your regular labs
No written final exam; two final project demos instead
- In-person SF project demo: in your last lab
- Final project demo: video submission in canvas by 12/11