Embedded System Tutorial Tasks
From Embedded Systems Learning Academy
					Revision as of 16:57, 13 January 2018 by Preet (talk | contribs) (Created page with "The objective of the assignment is to create multiple tasks and observe how they behave.  Please create two tasks, and have them run the following code:  <syntaxhighlight lang...")
The objective of the assignment is to create multiple tasks and observe how they behave. Please create two tasks, and have them run the following code:
void task_one(void)
{
    uart0_puts("aaaaaaaaaaaaaaaaaaaa");
    vTaskDelay(100);
}
void task_one(void)
{
    uart0_puts("bbbbbbbbbbbbbbbbbbbb");
    vTaskDelay(100);
}Further guidelines:
-   Use FreeRTOS xTaskCreate() to create tasks and use example code for reference.
- You may have to take some things for granted, such as "stack size" and 2048 bytes is enough stack size to run these tasks
 
- Use vTaskDelay() to "sleep"
- Do not use printf, instead use uart0_puts() function from #include "uart0_min.h"
Hints:
-   The printf data appears over 38400bps UART, which can roughly send 4 characters per millisecond
- When you send 20 chars (aaaaaaaaaaaaaaaaaaaa), it would take roughly 5ms to send the data
 
- The SJ-One board RTOS runs at 1Khz
Observe and turn in with your assignment:
- How come 4(or 3 sometimes) characters are printed from each task? Why not 2 or 5, or 6?
- Alter the priority of one of the tasks, and note down the observations. Note down WHAT you see and WHY.
Turn in (to Canvas):
- Relevant code
- Your observation and explanation
- Snapshot of the output for all scenarios.
 
							