Software Interrupt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Software Interrupt

3,548 次查看
Jules
Contributor I
Hello,

is there a possibility to cause an interrupt via Software(maybe with an assembler instruction or something else)??
I am using the MPC565.

Thanks,

Julian
标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

1,517 次查看
Teo
NXP Employee
NXP Employee
You could use:
- System call ("sc" mnemonic). Usually used for calls into OS kernels
- Unconditional trap instructions. Usually used for software breakpoints
- Program interrupt. i.e. an illegal opcode. Usually this is used as an alternative to unconditional trap for software breakpoints
- Debug interrupt. i.e. putting a hardware breakpoint when a PC has a sertain address.

Note that with exception of the first solution, you might interfier with the debugger. i.e. debugger to think the processors stopped due to its breakpoints, and your interrupt handler routine will never be called when you a debugging the application.

Best regards,
Teo
0 项奖励
回复

1,517 次查看
Jules
Contributor I
Thank you Teo,

but i don't know if this is the right for me.
Could i assing several priority levels wit the "system call"?

I am programming a simple preemptive OS(3 tasks).
For this i need two several priority levels for my tasks one higher then the other.
The PIT should cause the change by causing one of the two interrupts.

Best wishes,

Julian
0 项奖励
回复