Download presentation
Presentation is loading. Please wait.
1
LPC2148 ARM7 myKernel Details
- Bhavin Kamdar
2
Keil’s RTX Kernel Features
Active Tasks 250 Scheduling Round-Robin,Premeptive Task Priorities 1-250 Kernel RAM space < 300 bytes RAM space for task TotalStackSize+52 bytes Task Stack space On-demand Semaphores/Mutex Yes User timers Unlimited
3
TotalStackSize+RAM variables
MyKernel Features Active Task 8 Scheduling Round-Robin Kernel RAM space 256 bytes RAM space per task TotalStackSize+RAM variables Stack Size 512 bytes per task Semaphores/Mutex Yes User Timers Yes (Limited) Hardware RTC
4
myKernel Memory map The first bytes of RAM space is reserved for the kernel and task stack Each task is assigned 512 bytes of stack (512 * 8=4096 bytes) The kernel requires 256 bytes of memory to store task stack pointers, task return addresses and other scheduler variables
5
myKernel Scheduler The scheduler for myKernel is written completely in assembly to have full control over task stack and context switching. Scheduler executes in privilged mode of ARM whereas all task are executed in user mode only. Two complementary functions are provided in scheduler to add and remove tasks.
6
myKernel Scheduler (cntd)
Each task is given a time slice of 10ms The task context during a task switch is saved and retrieved from the task stack only Scheduler identifies task by a 8 bit process ID (PID).
7
Mutex / Task lists Each peripheral (UART0, GLCD, MMC and BT module) has its own binary semaphore Semaphore checking is implemented in assembly to provide true Read-while-write access Also each peripheral has an optional task list which allows access to peripheral in turn.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.