F29H85x-SDK  26.00.00
 
Sdl_xint_group

Introduction

Functions

static bool SDL_XINT_GPIO_isPinValid (uint32_t pin)
 
int32_t SDL_XINT_testIntr (SDL_XINT_GPIO_ExternalIntNum xintInstance, uint32_t gpio, uint32_t xintCtrMinThreshold, uint32_t xintCtrMaxThreshold)
 Checks the XINT interrupt test logic.
 
void SDL_XINT_handleIntr (SDL_XINT_GPIO_ExternalIntNum xintInstance)
 Handles XINT interrupts.
 

Enumerations

enum  SDL_XINT_GPIO_IntType { SDL_XINT_GPIO_INT_TYPE_FALLING_EDGE = 0x00 , SDL_XINT_GPIO_INT_TYPE_RISING_EDGE = 0x04 , SDL_XINT_GPIO_INT_TYPE_BOTH_EDGES = 0x0C }
 
enum  SDL_XINT_GPIO_ExternalIntNum {
  SDL_XINT_GPIO_INT_XINT1 = 0 , SDL_XINT_GPIO_INT_XINT2 = 2 , SDL_XINT_GPIO_INT_XINT3 = 4 , SDL_XINT_GPIO_INT_XINT4 = 6 ,
  SDL_XINT_GPIO_INT_XINT5 = 8
}
 

Macros

#define SDL_XINT_NO_INTERRUPT   (0U)
 
#define SDL_XINT_INTERRUPT   (1U)
 

Macro Definition Documentation

◆ SDL_XINT_NO_INTERRUPT

#define SDL_XINT_NO_INTERRUPT   (0U)

◆ SDL_XINT_INTERRUPT

#define SDL_XINT_INTERRUPT   (1U)

Enumeration Type Documentation

◆ SDL_XINT_GPIO_IntType

Enumerator
SDL_XINT_GPIO_INT_TYPE_FALLING_EDGE 

Interrupt on falling edge.

SDL_XINT_GPIO_INT_TYPE_RISING_EDGE 

Interrupt on rising edge.

SDL_XINT_GPIO_INT_TYPE_BOTH_EDGES 

Interrupt on both edges.

◆ SDL_XINT_GPIO_ExternalIntNum

Enumerator
SDL_XINT_GPIO_INT_XINT1 

External Interrupt 1.

SDL_XINT_GPIO_INT_XINT2 

External Interrupt 2.

SDL_XINT_GPIO_INT_XINT3 

External Interrupt 3.

SDL_XINT_GPIO_INT_XINT4 

External Interrupt 4.

SDL_XINT_GPIO_INT_XINT5 

External Interrupt 5.

Function Documentation

◆ SDL_XINT_GPIO_isPinValid()

static bool SDL_XINT_GPIO_isPinValid ( uint32_t pin)
inlinestatic

◆ SDL_XINT_testIntr()

int32_t SDL_XINT_testIntr ( SDL_XINT_GPIO_ExternalIntNum xintInstance,
uint32_t gpio,
uint32_t xintCtrMinThreshold,
uint32_t xintCtrMaxThreshold )

Checks the XINT interrupt test logic.

Parameters
xintInstanceis the particular instance of the XINT configuraton register.
gpiois the gpio pin in which particular external interrupt is connected.
xintCtrMinThresholdis the minimum threshold value of the XINT counter for particular XINT configuration register.
xintCtrMaxThresholdis the maximum threshold value of the XINT counter for particular XINT configuration register.

This function performs a test of the XINT interrupt logic, using the gpio pin and corresponding input XBAR. Before performing a test of the XINT , the user is expected to configure the GPIO and input XBAR which will be connected to particular external interrupt. Each GPIO is connected with a specific external interrupt. Input XBAR 4 is connected to XINT1 (fixed) Input XBAR 5 is connected to XINT2 (fixed) Input XBAR 6 is connected to XINT3 (fixed) Input XBAR 13 is connected to XINT4 (fixed) Input XBAR 14 is connected to XINT5 (fixed) Here we follow total 4 tests i.e interrupt is generated for 4 conditions. Rising edge test, Falling edge test, Both edges rising edge and Both edges falling edge. Raise an interrupt for each external interrupt if valid interrupt edge is detected.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_XINT_handleIntr()

void SDL_XINT_handleIntr ( SDL_XINT_GPIO_ExternalIntNum xintInstance)

Handles XINT interrupts.

Parameters
xintInstanceis the particular instance of the XINT configuraton register.

This function handles XINT interrupts triggered by the tests. When an interrupt occurs, the interrupt triggers the ISR, which in turn calls this function to appropriately handle the interrupt.