0% found this document useful (0 votes)
22 views4 pages

Rtos Part 09

The document outlines the operation of a UART communication system with a focus on task scheduling in a single-core processor environment. It describes the use of Interrupt Service Routines (ISRs) for managing tasks and the implementation of deferred interrupts to handle semaphore signaling. Additionally, it explains the process of averaging samples collected from an ADC and displaying results via a serial terminal.

Uploaded by

The UnCONFUSED
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Rtos Part 09

The document outlines the operation of a UART communication system with a focus on task scheduling in a single-core processor environment. It describes the use of Interrupt Service Routines (ISRs) for managing tasks and the implementation of deferred interrupts to handle semaphore signaling. Additionally, it explains the process of averaging samples collected from an ADC and displaying results via a serial terminal.

Uploaded by

The UnCONFUSED
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UART

Comms
UART
Buffer

CPU
What actually happens* *assuming single-core processor

“preemptive scheduling” Interrupt Service Routine (ISR)


ISR
(H/W)
Priority
(S/W)
...

1 Task B Task C Task C

0 Task A Task A Task A Task A

OS Idle

“tick” time
1 ms
Deferred Interrupt
ISR gives semaphore Scheduler called to run
Blocked waiting for semaphore newly unblocked task

ISR
(H/W)
Priority
(S/W)
...

2 B

1 Task A Task A Task A Task A Task A Task A

OS Idle

“tick” time
1 ms
After 10 samples have
been read, Task A will
wake up and compute
Double Buffer or the average.
Circular Buffer
Task A

Global:
Timer ISR Average
Samples from (float)
ADC (10 Hz)
Task B

Serial Terminal

> hello
> avg
Average: 59.2
> blah
>

You might also like