iLLD_TC23x  1.0
How to use Service Request Mechanism?
Collaboration diagram for How to use Service Request Mechanism?:

For Aurix controller peripherals that can generate service requests is connected to one or more Service Request Nodes (SRNs) in the central Interrupt Router(IR) module. Refer to Controller User Manual for more details

IfxSrc driver provides the APIs to configure and control service requests. Refer How to use Service Request Mechanism? for details of these APIs.

Initialize the Service Request Node

Service request node is initialized to configure the following,
1) Route the interrupt trigger to service provider, which are:
__a. One of the available CPUs or
__b. DMA controller

2) Priority of CPU Interrupt or DMA Trigger.

For Interrupt or DMA to be correctly triggered, following steps are to be done in the user code:

Step1: Configure the Node

User must configure the service request node in the application / driver files.

Step2: Enable the Trigger

Enable the service request node to connect the trigger event from the hardware to service provider.

Example: Following example show the configuration for STM0 Service request 0 trigger configured to trigger CPU1 with the priority specified by IFX_INTPRIO_STM0 (from the example at IfxCpu_Irq)

//file: myApplication.c
#include "Ifx_IntPrioDef.h" // to get the priority numbers
void myDriverInitFunction(void)
{
// driver init code
// Step1: Call the function to route the trigger from for SRC_STM0_SR0 to CPU1
// and priority specified at Ifx_IntPrioDef.h globally
IfxSrc_init(&MODULE_SRC.STM.STM[0].SR[0], IfxSrc_Tos_cpu1, IFX_INTPRIO_STM0);
// Step2: Enable the service request node
IfxSrc_enable(&MODULE_SRC.STM.STM[0].SR[0]);
}