Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
intc_infineon_aurix.h File Reference

Public API for the Infineon AURIX Interrupt Router (IR). More...

#include <zephyr/types.h>
#include <zephyr/device.h>

Go to the source code of this file.

Macros

#define IR_BASE   DT_REG_ADDR_BY_IDX(DT_INST(0, infineon_aurix_ir), 0)
 Base address of the AURIX Interrupt Router (IR) MMIO block.
#define SRC_BASE   DT_REG_ADDR_BY_IDX(DT_INST(0, infineon_aurix_ir), 1)
 Base address of the AURIX Service Request Control (SRC) MMIO block.

Functions

void intc_aurix_ir_irq_config (unsigned int irq, unsigned int priority, unsigned int flags)
 Configure an AURIX interrupt source.
void intc_aurix_ir_irq_enable (unsigned int irq)
 Enable an AURIX interrupt source.
void intc_aurix_ir_irq_disable (unsigned int irq)
 Disable an AURIX interrupt source.
bool intc_aurix_ir_irq_is_enabled (unsigned int irq)
 Query whether an AURIX interrupt source is enabled.
bool intc_aurix_ir_irq_is_pending (unsigned int irq)
 Query whether an AURIX interrupt source has a pending request.
void intc_aurix_ir_irq_clear_pending (unsigned int irq)
 Clear a pending request on an AURIX interrupt source.
void intc_aurix_ir_irq_raise (unsigned int irq)
 Raise an AURIX interrupt source by IRQ number.
unsigned int intc_aurix_ir_get_active (void)
 Return the currently active IRQ number.
void intc_aurix_ir_src_raise (uintptr_t src)
 Raise an AURIX interrupt source by SRC register address.

Detailed Description

Public API for the Infineon AURIX Interrupt Router (IR).

The AURIX interrupt subsystem is built from two cooperating blocks:

  • The Interrupt Router (IR), which arbitrates pending Service Requests among the CPUs and the DMA, and drives the per-source priority comparator.
  • The Service Request Control (SRC) registers, one per interrupt source, which carry the per-source enable, priority, routing and pending bits.

This header exposes the small low-level helpers used by the Zephyr TriCore IRQ glue to configure, enable, query and raise individual interrupt sources.

Macro Definition Documentation

◆ IR_BASE

#define IR_BASE   DT_REG_ADDR_BY_IDX(DT_INST(0, infineon_aurix_ir), 0)

Base address of the AURIX Interrupt Router (IR) MMIO block.

◆ SRC_BASE

#define SRC_BASE   DT_REG_ADDR_BY_IDX(DT_INST(0, infineon_aurix_ir), 1)

Base address of the AURIX Service Request Control (SRC) MMIO block.

Function Documentation

◆ intc_aurix_ir_get_active()

unsigned int intc_aurix_ir_get_active ( void )

Return the currently active IRQ number.

Reads the CPU's identifier of the interrupt currently being serviced, as latched at interrupt entry.

Returns
The currently active Zephyr-encoded IRQ number.

◆ intc_aurix_ir_irq_clear_pending()

void intc_aurix_ir_irq_clear_pending ( unsigned int irq)

Clear a pending request on an AURIX interrupt source.

Writes the CLRR bit in the matching SRC register, which clears SRR without affecting other fields.

Parameters
irqZephyr-encoded IRQ number.

◆ intc_aurix_ir_irq_config()

void intc_aurix_ir_irq_config ( unsigned int irq,
unsigned int priority,
unsigned int flags )

Configure an AURIX interrupt source.

Programs the per-source SRC register with the given priority and any flags supported by the SoC (e.g. type-of-service / routing).

Parameters
irqZephyr-encoded IRQ number.
priorityInterrupt priority value to write into SRPN.
flagsImplementation-defined flags (typically the TOS field).

◆ intc_aurix_ir_irq_disable()

void intc_aurix_ir_irq_disable ( unsigned int irq)

Disable an AURIX interrupt source.

Clears the SRE bit in the matching SRC register. Pending requests in the source are left untouched.

Parameters
irqZephyr-encoded IRQ number.

◆ intc_aurix_ir_irq_enable()

void intc_aurix_ir_irq_enable ( unsigned int irq)

Enable an AURIX interrupt source.

Sets the SRE bit in the matching SRC register so the source can request service.

Parameters
irqZephyr-encoded IRQ number.

◆ intc_aurix_ir_irq_is_enabled()

bool intc_aurix_ir_irq_is_enabled ( unsigned int irq)

Query whether an AURIX interrupt source is enabled.

Parameters
irqZephyr-encoded IRQ number.
Returns
true if the source's SRE bit is set, false otherwise.

◆ intc_aurix_ir_irq_is_pending()

bool intc_aurix_ir_irq_is_pending ( unsigned int irq)

Query whether an AURIX interrupt source has a pending request.

Parameters
irqZephyr-encoded IRQ number.
Returns
true if the source's SRR bit is set, false otherwise.

◆ intc_aurix_ir_irq_raise()

void intc_aurix_ir_irq_raise ( unsigned int irq)

Raise an AURIX interrupt source by IRQ number.

Sets the SETR bit in the matching SRC register, requesting service from software. Useful for self-test and software-triggered IPIs.

Parameters
irqZephyr-encoded IRQ number.

◆ intc_aurix_ir_src_raise()

void intc_aurix_ir_src_raise ( uintptr_t src)

Raise an AURIX interrupt source by SRC register address.

Variant of intc_aurix_ir_irq_raise that targets a source by its absolute SRC register address rather than by IRQ number. Intended for call sites that already hold the SRC pointer (e.g. driver-internal software events).

Parameters
srcAbsolute address of the source's SRC register.