IRQ Custom Code

<< Click to Display Table of Contents >>

Navigation:  Waijung Blockset > Block References > Custom Code >

IRQ Custom Code

Previous pageReturn to chapter overviewNext page

User Interface

How this block appears in a Simulink model?

irq_custom_code_block

What can be configured?

irq_custom_code_mask

Output block

Output of IRQ Custom Code block is function-call signal. When interrupt activated, it generates function-call to execute the block in function-call subsystem.

When to use this block?

When you want to add your own custom asynchronous (interrupt) C code to the system.

How does this block work?

1. IRQ Handler

- Define the prototype of interrupt handler routine (without semi-colon ";" )

- An example for interrupt handle for External Interrupt line 0: void EXTI0_IRQHandler(void)

2. See Basic Custom code for explanation of Mask parameters of the block.

Demo

IRQ Custom Code demo