Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to service an interrupt using a timer at the end of task

Status
Not open for further replies.

fanghl

Newbie level 4
Newbie level 4
Joined
Jul 8, 2006
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Seattle
Activity points
1,319
Need help on interrupt

I'm working on a class project that we are building a simple kernel on Tern TD40 board. That thing has two internal clocks. We are required to use one of them to schedule task control block. we need to service an interrupt using the timer at the end of each task cycle and I don't know how to do that.

any help would be greatly appreciated.
 

Need help on interrupt

It's based on AM186.
 

Re: Need help on interrupt

Do you have any RTOS running on that board? If you do, you will need to find out how to plug in yout interrupt handler into that RTOS. If you don't than, find any book about x86 real mode programming, and all description on interrupt handling is there. You may want to search this board, to see if there were previous posts regardng those books.
 

Re: Need help on interrupt

from what u have writen i understand that u want to switch tasks with the help of timer interrupt.
1. configure one of the timer say timer1 to interval mode with 1 ms time. So after
every i ms time it will raise an interrupt.
2. place your scheduler at this interrupt address. The job of scheduler is if more than
one task are present move the running task to "ready" state and move the other
but higher priority task to "runnung" state.
3. your scheduler internaly need to call dispatcher which will take care for saving and
restoring task contest.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top