iLLD_TC27xC  1.0
How to use the IOM Iom Interface driver?
Collaboration diagram for How to use the IOM Iom Interface driver?:

IOM Module takes the monitor and reference signals from applicable system peripherals(GTM,CCU6,QSPI,PSI5,ASCLIN) and also from external hardware(Sensors) and compare them with respect to one another and generate the alarm events which are routed to SMU.

In the following sections it will be described, how to integrate the driver into the application framework.

Preparation

Include Files

Include following header file into your C code:

Variables

Declare the IOM handle and the configuration buffers as global variables in your C code:

static IfxIom_Iom_EcmConfig ecmConfig;
static IfxIom_Iom_FpcConfig fpcConfig;
static IfxIom_Iom_LamConfig lamConfig;
static IfxIom_Iom iom;

Module Initialisation

The module initialisation can be done in the same function. Here an example:

//Initialize the module handle
IfxIom_Iom_initModuleConfig(&iom, &MODULE_IOM);
//Enable the module control
//Initialize the default Filter & Prescaler Cell channel configuration buffer
//Filter & Prescaler Cell channel supplied configuration
fpcConfig.comparatorThreshold = 15;
fpcConfig.timerReset = TRUE;
//Initialize the Filter & Prescaler Cell channel with supplied configuration
IfxIom_Iom_initFpcChannel(&iom, &fpcConfig);
//Initialize the default Logic Analyser Module configuration buffer
//Logic Analyser Module Block supplied configuration
lamConfig.lamMode = IfxIom_LamRunMode_running;
lamConfig.lamId = IfxIom_LamId_2;
lamConfig.eventWindowThreshold = 15;
//Initialize the Logic Analyser Module with supplied configuration
IfxIom_Iom_initAnalyser(&iom, &lamConfig);
//Initialize the default Event Combiner Module configuration buffer
//Initialize the Logic Analyser Module with supplied configuration
IfxIom_Iom_initCombiner(&iom, &ecmConfig);

The IOM is ready for use now!

Once the Iom driver is initialized, GTM or CCU6 or QSPI or PSI5 or ASCLIN should be configured to get the two signals with some delay by which event occur.

The tested two signals are at below pins.

To generate GTM signals see How to use the GTM TOM PWM Driver

Two GTM signals at below PWM out pins are used as monitor or reference to IOM

Ifx_P* testPort0 = uint8 testPin0 = 2; Ifx_P* testPort1 = uint8 testPin1 = 2;

First pin is for Monitor and second pin is for reference. The above initialized IOM generates the event to SMU if pulse or duty cycle too short.