A collection of apps for Micrium uC/OS-III on the FRDM-K64F platform by Freescale developed during lab sessions of a course on operating systems for embedded systems.
Download the OS with the BSP for K64F from http://micrium.com/download/frdm-k64f_os3-ksdk/ . To run a program place a file in "Micrium/Examples/Freescale/FRDM-K64F" and rename it "app.c".
Create three tasks: 1) blinks blue led at 5Hz; 2) blinks red led at 2Hz; 3) blinks green led at 1Hz. Colors must not overlap (solution makes use of OS_SEM).
Create three tasks: 1) blinks blue led at 5Hz; 2) blinks red led at 2Hz; 3) blinks green led at 1Hz. Colors must not overlap (solution makes use of OS_MUTEX).
Create two tasks: 1) turns on red led if SW1 is pressed; 2) turns on green led if SW2 is pressed. Colors must not overlap (solution makes use of OS_SEM).
Set up an interrupt handler that turns on/off the blue led when SW1 is toggled.
Create two tasks: 1) turns on/off red led when SW1 is pressed; 2) turns on/off green led when SW2 is pressed. Use two ISRs to respond to the triggering of the switches and use two distinct semaphores as a signalling system; leds can be on at the same time.
Define two custom GPIO pins: 1) PORTB.23 as digital output; 2) PORTB.9 as digital input A task should drive PORTB.23 with a freq. of 5Hz Also: calculate the period a positive pulse is present on PORTB.9 and print it on the serial port
Using POLLING: create a task that receives data from the HC-SR04 ultrasonic sensor and writes on the serial port the distance (in cm) of objects.
Using INTERRUPTS: create a task that receives data from the HC-SR04 ultrasonic sensor and writes on the serial port the distance (in cm) of objects.
An app that uses the HC-SR04 and blinks different LEDs with frequency depending on the measured object distance.