Next:
Introduction
Dr. Tak's Real Time Kernel (DTRTK) for the Atmel AVR MCUs
Tak Auyeung, Ph.D.
Introduction
What does an RTK do?
Terms
Process.
Thread.
Multithreading
Round Robin
Preemptive Thread Change
Priority Queues
Time Based Scheduling
Time Slicing
Inter-thread Synchronization
Files to Compile and Link
timer.S
rtk.S
main.make
Downloading and Installing
Important Application Dependent Macros
RTK_NUMQUEUES
ISR_FREQ
TICK_FREQ
TIMER_ISR
TIMER_RTK_PREEMPT
TIMER_APP_CALL
The API
struct Thread
struct Queue
extern struct Queue rtkQueues[RTK_NUMQUEUES]
unsigned char rtkSliceScaler
unsigned char rtkSliceCounter
void rtkInitialize(struct Thread *t, struct Queue *q)
void rtkThreadAdd(struct Thread *t, struct Queue *q, void *SP, void (*start)(void *), void *param)
void rtkThreadSuicide(void)
void rtkThreadKill(struct Thread* thread, struct Queue* queue)
struct Tick
struct Tick *rtkTickCountGet(struct Tick *t)
struct Tick *tickAdd4(struct Tick *t, unsigned long u4)
struct Thread *rtkCurrentThread
void rtkThreadSchedule(struct Thread *t, struct Tick *t)
void rtkThreadYield(void)
void rtkSemaphoreInitialize(struct Semaphore *s, char initValue)
void rtkSemaphoreP(struct Semaphore *s)
void rtkSemaphoreV(struct Semaphore *s)
int rtkSemaphoreTryP(struct Semaphore *s)
Examples
onethread
onethread_sch
Advanced Topics
Interrupt Service Routines
ISR Philosophy
An Example
Implementation
Tak's solution
FAQ
What environment/tool set is needed?
I really need to use this in Windows with WinAVR, is it possible?
How does this RTK differ from AVRX?
What is the selling point of this RTK?
What is the future of this RTK?
Is this a competitive product?
Is this RTK free?
Is this RTK related to any Z-World/RabbitSemiconductor product?
About this document ...
Tak Auyeung 2004-08-10