01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DL<br />

CX<br />

ES:BX<br />

BIT7: 0=normal ISR, 1=RTX ISR (RTX ISR allow RTX Calls, e.g. wake a task), please notice the<br />

comment below!<br />

HAL interrupt number from following list:<br />

0 = INT0 (external)<br />

1 = Network controller (internal) (*)<br />

2 = INT2 (external)<br />

3 = INT3 (external)<br />

4 = INT4 (external)<br />

5 = INT5 (external) / DMA Interrupt Channel 0 (if DMA is used)<br />

6 = INT6 (external) / DMA Interrupt Channel 1 (if DMA is used)<br />

7 = reserved<br />

8 = Timer0 (internal)<br />

9 = Timer1 (internal)<br />

10 = Timer 1ms (internal) (*)<br />

11 = Serial port 0 (internal)(*)<br />

12 = Serial port 1 (internal)(*)<br />

13 = reserved<br />

14 = reserved<br />

15 = NMI (internal/external)<br />

(* = internal used by <strong>@CHIP</strong>-<strong>RTOS</strong>, not available for user interrupt service functions)<br />

Number of interrupts generated before new user interrupt service routine is called.<br />

CX = 0 disables the user ISR (same as a NULL in ES:BX).<br />

far pointer to user interrupt service routine<br />

if pointer is NULL user ISR is disabled<br />

Return Value<br />

Comments<br />

Far pointer to old handler in ES:BX<br />

The user-defined ISR is called from a system ISR with the interrupt identifier number in the BX CPU<br />

register, thus allowing for a single user ISR to handle multiple interrupt sources. The user ISR can be<br />

declared in either of the following forms:<br />

void huge My_ISR(void) ; // More efficient form<br />

void interrupt My_ISR(void) ; // Tolerated form<br />

The more efficient huge procedures are recommended. For assembly language ISR implementations, a<br />

far RET is recommended and a IRET on exit is tolerated. The user ISR function must preserve only the<br />

DS and BP registers, so there is no requirement for the full register save/restore provided by the<br />

interrupt declarations.<br />

Any required EOI signal is issued by the system ISR which calls your user ISR function. This EOI is<br />

issued after your function returns.<br />

If you install a RTX ISR you can use the following RTX calls in your ISR:<br />

RTX_RESTART_TASK<br />

RTX_WAKEUP_TASK<br />

RTX_SIGNAL_SEM<br />

Page 296 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!