Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Interrupts

Typedefs

typedef void(* vth) (void)
 

Functions

void test_build_time_direct_interrupt (void)
 test to validate direct interrupt
 
void test_build_time_interrupt (void)
 test to validate gen_isr_table and interrupt
 
void test_run_time_interrupt (void)
 test to validate gen_isr_table and dynamic interrupt
 
void test_dynamic_shared_irq_write (void)
 Test writing to a vector with a shared interrupt.
 
void test_dynamic_shared_irq_disconnect_write (void)
 Test writing to a vector after an ISR/arg disconnect.
 
void test_isr_offload_job_multiple (void)
 Test interrupt offload work to multiple jobs.
 
void test_isr_offload_job_identi (void)
 Test interrupt offload work to identical jobs.
 
void test_isr_offload_job (void)
 Test interrupt offload work by dynamic interrupt.
 
void test_prevent_interruption (void)
 Test interrupt prevention.
 
void test_isr_regular (void)
 Test regular interrupt.
 
void test_static_shared_irq_write (void)
 Test writing to a vector using static shared interrupts.
 
void test_arm_custom_interrupt (void)
 
void test_arm_irq_vector_table (void)
 Test installation of ISRs directly in the vector table.
 
void test_arm_runtime_nmi (void)
 test the behavior of CONFIG_RUNTIME_NMI at run time
 
void test_direct_interrupt (void)
 Test direct interrupt function.
 
void test_idt_stub (void)
 Test the position of interrupt stubs in IDT.
 
void test_static_idt (void)
 Test entry point to static IDT.
 

Detailed Description

Test the behavior of CONFIG_RUNTIME_NMI at runtime.

Test custom interrupt controller handling with CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER.

Typedef Documentation

◆ vth

Function Documentation

◆ test_arm_custom_interrupt()

◆ test_arm_irq_vector_table()

void test_arm_irq_vector_table ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c>

Test installation of ISRs directly in the vector table.

Test validates the arm irq vector table. We create a irq vector table with the address of the interrupt handler. We write into the Software Trigger Interrupt Register(STIR) or calling NVIC_SetPendingIRQ(), to trigger the pending interrupt. And we check that the corresponding interrupt handler is getting called or not.

See also
irq_enable(), z_irq_priority_set(), NVIC_SetPendingIRQ()

◆ test_arm_runtime_nmi()

void test_arm_runtime_nmi ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/arm/arm_runtime_nmi/src/arm_runtime_nmi.c>

test the behavior of CONFIG_RUNTIME_NMI at run time

this test is to validate z_arm_nmi_set_handler() api. First we configure the NMI isr using z_arm_nmi_set_handler() api. After wait for some time, and set the Interrupt Control and State Register(ICSR) of System control block (SCB). The registered NMI isr should fire immediately.

See also
z_arm_nmi_set_handler()

◆ test_build_time_direct_interrupt()

void test_build_time_direct_interrupt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/gen_isr_table/src/main.c>

test to validate direct interrupt

initialize two direct interrupt handler using IRQ_DIRECT_CONNECT api at build time. For ‘direct’ interrupts, address of handler function will be placed in the irq vector table. And each entry contains the pointer to isr and the corresponding parameters.

At the end according to architecture, we manually trigger the interrupt. And all irq handler should get called.

See also
IRQ_DIRECT_CONNECT(), irq_enable()

◆ test_build_time_interrupt()

void test_build_time_interrupt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/gen_isr_table/src/main.c>

test to validate gen_isr_table and interrupt

initialize two normal interrupt handler using IRQ_CONNECT api at build time. For 'regular' interrupts, the address of the common software isr table is placed in the irq vector table, and software ISR table is an array of struct _isr_table_entry. And each entry contains the pointer to isr and the corresponding parameters.

At the end according to architecture, we manually trigger the interrupt. And all irq handler should get called.

See also
IRQ_CONNECT(), irq_enable()

◆ test_direct_interrupt()

void test_direct_interrupt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/x86/direct_isr/src/direct_isr.c>

Test direct interrupt function.

validate direct interrupt works as expected.

  • Register two direct interrupt at build time.
  • Trigger interrupt and check if isr handler has executed or not.
  • Also check irq_enable and irq_disable works.
See also
IRQ_DIRECT_CONNECT(), ISR_DIRECT_DECLARE()

◆ test_dynamic_shared_irq_disconnect_write()

void test_dynamic_shared_irq_disconnect_write ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/dynamic_shared_irq.c>

Test writing to a vector after an ISR/arg disconnect.

This tests if ISR/arg pairs are disconnected successfully and the interrupts are "unshared" whenever a single ISR/arg pair is left.

◆ test_dynamic_shared_irq_write()

void test_dynamic_shared_irq_write ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/dynamic_shared_irq.c>

Test writing to a vector with a shared interrupt.

This tests if interrupts are dynamically shared successfully (i.e: multiple ISR/arg pairs are called whenever the interrupt they were registered for is triggered).

◆ test_idt_stub()

void test_idt_stub ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/x86/static_idt/src/main.c>

Test the position of interrupt stubs in IDT.

This test examines the IDT and verifies that the static interrupt and exception stubs are installed at the correct place.

◆ test_isr_offload_job()

void test_isr_offload_job ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/interrupt_offload.c>

Test interrupt offload work by dynamic interrupt.

Validate isr can offload workload to work queue, and the offload jobs could execute immediately base on it's priority. We test this by dynamic interrupt.

◆ test_isr_offload_job_identi()

void test_isr_offload_job_identi ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/interrupt_offload.c>

Test interrupt offload work to identical jobs.

Validate isr can offload workload to work queue, and all the offload jobs use the same thread entry, and:

  • If the priority of the original thread < offload job, offload jobs could execute immediately.
  • If the priority of the original thread >= offload job, offload jobs will not execute immediately.

We test this by irq_offload().

◆ test_isr_offload_job_multiple()

void test_isr_offload_job_multiple ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/interrupt_offload.c>

Test interrupt offload work to multiple jobs.

Validate isr can offload workload to multi work queue, and:

  • If the priority of the original thread < offload job, offload jobs could execute immediately.
  • If the priority of the original thread >= offload job, offload jobs will not execute immediately.

We test this by irq_offload().

◆ test_isr_regular()

void test_isr_regular ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/regular_isr.c>

Test regular interrupt.

Validate regular interrupt works as expected.

  • Register two regular interrupt at build time.
  • Trigger interrupt and check if isr handler has executed or not.
  • Also check irq_enable and irq_disable works.
See also
IRQ_CONNECT(), irq_enable(), irq_disable(), irq_unlock(),

◆ test_prevent_interruption()

void test_prevent_interruption ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/prevent_irq.c>

Test interrupt prevention.

This routine tests if the kernel is capable of preventing interruption, by locking interrupts and busy-waiting to see if the system timer interrupt is serviced while interrupts are locked; in addition, this test also verifies that the system timer interrupt is serviced after interrupts are unlocked.

◆ test_run_time_interrupt()

void test_run_time_interrupt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/gen_isr_table/src/main.c>

test to validate gen_isr_table and dynamic interrupt

initialize two dynamic interrupt handler using irq_connect_dynamic api at run time. For dynamic interrupts, the address of the common software isr table is also placed in the irq vector table. Software ISR table is an array of struct _isr_table_entry. And each entry contains the pointer to isr and the corresponding parameters.

At the end according to architecture, we manually trigger the interrupt. And all irq handler should get called.

See also
irq_connect_dynamic(), irq_enable()

◆ test_static_idt()

void test_static_idt ( void )

#include </home/runner/work/safety-doc/zephyr/tests/arch/x86/static_idt/src/main.c>

Test entry point to static IDT.

this test is to generate the interrupt, exception, and spurious interrupt using various method, the registered handler should get called

◆ test_static_shared_irq_write()

void test_static_shared_irq_write ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/interrupt/src/static_shared_irq.c>

Test writing to a vector using static shared interrupts.

This tests if interrupts are statically shared successfully (i.e: multiple ISR/arg pairs are called whenever the interrupt they were registered for is triggered).