2015年6月10日水曜日
PRJ#3 Interesting application using multiple components
PRJ#3 Interesting application using multiple components
HW#6 Create Two Tasks and an Interrupt Handler (ISR)
HW#6 Create Two Tasks and an Interrupt Handler (ISR)
• Create two tasks
and an interrupt handler (ISR)
• Task#1 should
perform the following in a loop:
• delay (sleep) for about 200 ms
• send five messages in a queue#1 (to
ISR())
• generate an sw interrupt
• ISR should
perform the following:
• receive all the messages from queue#1
• modify each message and send them on queue#2
• Task#2 should
perform the following in a loop:
• receive each item from queue#2
•
print
the value out
HW#5 Simulate High Frequency interrupts scenario
HW#5 Simulate High Frequency interrupts scenario
• Simulate high frequency interrupts scenario and use counting semaphores
to avoid lost events between ISR and sync.task
• Hint: To simulate high frequency interrupts, each time an interrupt
has arrived, perform multiple semaphore posts (gives) in the ISR.
• Expected output: You should see multiple prints from the sync.
Task demonstrating that we have received multiple sem posts.
HW#4 Message Queue
HW#4 Message Queue (lec 7)
Summary: Design a three task application with producers and consumers (similar to the assignment #10)
------------
Summary: Design a three task application with producers and consumers (similar to the assignment #10)
------------
• Design a three task application with producers and consumers
(similar to the previous exercise)
• two producers (writers) which
send data into the shared queue
• a consumer (reader) which
receives each item and prints that
• This time pass compound datatypes (structures) instead long or int
into the messages queues
• Also, make both the writers (equal) higher priority compared to
the reader task – you may have to make further changes to get everything
reliably working (with no queue overflows, etc.)
• Observe how the schedule changes
• Describe the schedule in brief notes (just a few lines)
-------------
EX10
HW4
EX11-14
HW5
HW6
-------------
EX10
HW4
EX11-14
HW5
HW6
HW#3 Round Robin Queue Implementation
HW#3 Round Robin Queue Implementation
- • create two tasks with different priorities (hi and lo)
- • each task should never call a blocking function (delay, etc.)
- • so both tasks are always ready
- • Use the priorty-set and priority-get function calls to effectively obtain a round-robin schedule
http://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html
New Name | Description |
TaskHandle_t | Used to reference tasks. |
QueueHandle_t | Used to reference queues. |
SemaphoreHandle_t | Used to reference binary, counting, recursive and mutex type semaphores. |
TimerHandle_t | Used to reference software timers. |
CoRoutineHandle_t | Used to reference co-routines. |
TickType_t | Used to hold tick count values |
BaseType_t | Defined to the most efficient signed type for the architecture. |
UBaseType_t | Defined to the most efficient unsigned type for the architecture. |
QueueSetHandle_t | Used to reference a queue set. |
QueueSetMemberHandle_t | Used to reference a member of a queue set, which can be a queue or any of the semaphore types. |
MemoryRegion_t | Used with ports that support memory protection. |
TaskParameters_t | Used with ports that support memory protection. |
TaskStatus_t | Used in with the uxTaskGetSystemState() function. |
TaskHookFunction_t | Used with the task tag functions (for example vTaskSetApplicationTag(). |
TaskFunction_t | Used with the xTaskCreate() function. |
TimerCallbackFunction_t | Used with the xTimerCreate() function. |
TimeOut_t | For advanced users only. |
#14 Create a new version of vPrintString() called vNewPrintString()
#14 Create a new version of vPrintString() called vNewPrintString()
#13 Create a new version of vPrintString() called vNewPrintString()
#13 Create a new version of vPrintString() called vNewPrintString()
#11 Implement a typical workflow with an ISR and a sync task
#11 Implement a typical workflow with an ISR and a sync task
#10 message queue: Three tasks application with producers and consumers
#10 message queue: Three tasks application with producers and consumers
• Design a three task application with producers and consumers
• two producers (writers) which send data into the shared queue
• a consumer (reader) which receives each item and prints that
• challenge:
• What should be the priority of the reader so that it receives data immediately after a send, after one or two writers are able write to the queue (not just one writer)
• Design a three task application with producers and consumers
• two producers (writers) which send data into the shared queue
• a consumer (reader) which receives each item and prints that
• challenge:
• What should be the priority of the reader so that it receives data immediately after a send, after one or two writers are able write to the queue (not just one writer)
#8 void vApplicationIdleHook(void)
#8 void vApplicationIdleHook(void)
Create an application to get an estimate of the idle CPU time
Create an application to get an estimate of the idle CPU time
2015年6月9日火曜日
#7 Replace a busy loop with delay function vTaskDelayUntil()
FreeRTOS assignment #7
Replace a busy loop with delay function vTaskDelayUntil()
Replace a busy loop with delay function vTaskDelayUntil()
#6 Replace a busy for loop with delay functions
#6 Replace a busy for loop with delay functions
vTaskDelay()
vTaskDelay()
#5 Use a for loop to create a delay, after a delay
FreeRTOS Assignment 5
#5 Use a for loop to create a delay, after a delay
#5 Use a for loop to create a delay, after a delay
#4 Parameter passing from main to task
FreeRTOS Assignment 4
Obective:
Obective:
- Parameter passing from main to task
- Print parameter passed (pointer), not a local string
登録:
投稿 (Atom)