Xgate

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

Xgate

477 次查看
pierobreda
Contributor I

A question about Xgate: it is not clear wether it can execute ONLY     Interrupt Service Routines or any other piece of code ( like a task which requires a fast turn around time but no ISR )

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

313 次查看
HSW
NXP Employee
NXP Employee

Yes, XGATE threads can only be invoked through interrupts, but the XGATE provides a set of software triggers (XGSWT register) that make it easy to launch a task via the S12X CPU. Software triggers work like regular interrupt flags, but they can be set and cleared directly through a register access.

Since the XGATE has a short interrupt latency (ideally approx. 5 bus clock cycles), the interrupt based trigger mechanism still suits tasks with fast turn around time.

0 项奖励

313 次查看
kef
Specialist I

At startup XGATE is idle. To make it running, one of interrupts, which is routed to XGATE, should fire. To execute some forever-task, just don't let XGATE exit thread. On S12XD/S12XA XGATE threads are not interruptible. On S12XE there are high priority (levels 4-7) threads and low priority (levels 1-3) threads. Low priority threads can be interrupted by high priority threads. High priority threads cann't be interrupted. So to use it like CPU with interrupts, you need to 1) start and never exit low priority thread, and 2) sevice interrupts using high priority threads.

0 项奖励