Texas Instruments TMS320C645x manual Interrupt and Event Generation

Page 13

Interrupt and Event Generation

3 Interrupt and Event Generation

Each GPIO pin (GPn) can be configured to generate a CPU interrupt (GPINTn) and a synchronization event to the EDMA controller (GPINTn). The interrupt and EDMA event can be generated on the rising-edge, falling-edge, or on both edges of the GPIO signal. The edge detection logic is synchronized to the GPIO peripheral clock.

The direction of the GPIO pin does not need to be input when using the pin to generate the interrupt and EDMA event. When the GPIO pin is configured as input, transitions on the pin trigger interrupts and EDMA events. When the GPIO pin is configured as output, software can toggle the GPIO output register to change the pin state and in turn trigger the interrupt and EDMA event.

Two internal registers, RIS_TRIG and FAL_TRIG, specify which edge of the GPn signal generates an interrupt and EDMA event. Each bit in these two registers corresponds to a GPn pin. Table 1 describes the CPU interrupt and EDMA event generation of GPn pin based on the bit settings of the RIS_TRIG and FAL_TRIG registers.

Table 1. GPIO Interrupt and EDMA Event Configuration Options

RIS_TRIG bit n

FAL_TRIG bit n CPU Interrupt and EDMA Event Generation

0

0

GPINTn interrupt and EDMA event is disabled

0

1

GPINTn interrupt and EDMA event is triggered on falling edge of GPn

 

 

signal

1

0

GPINTn interrupt and EDMA event is triggered on rising edge of GPn

 

 

signal

1

1

GPINTn interrupt and EDMA event is triggered on both rising and falling

 

 

edge of GPn signal

 

 

 

RIS_TRIG and FAL_TRIG are not directly accessible or visible to the CPU. These registers are accessed indirectly through four registers: SET_RIS_TRIG, CLR_RIS_TRIG, SET_FAL_TRIG, and CLR_FAL_TRIG. Writing 1 to a bit on the SET_RIS_TRIG register sets the corresponding bit on the RIS_TRIG register. Writing 1 to a bit of CLR_RIS_TRIG register clears the corresponding bit on the RIS_TRIG register. Writing to SET_FAL_TRIG and CLR_FAL_TRIG works the same way on the FAL_TRIG register.

SPRU724

General-Purpose Input/Output (GPIO)

13

Image 13
Contents Literature Number SPRU724 December Important Notice About This Manual Read This FirstTrademarks Contents Figures Tables This page is intentionally left blank Overview General-PurposeTMS320C645x DSP Block Diagram Gpio Peripheral Block Diagram Gpio Function Interrupt and Event Generation Gpio Interrupt and Edma Event Configuration OptionsEmulation Halt Operation Gpio Registers RegistersInterrupt Per-Bank Enable Register Binten Interrupt Per-Bank Enable Register BintenDirection Register DIR Direction Register DIRDirection Register DIR Field Descriptions Output Data Register Outdata Field Descriptions Output Data Register OutdataSet Data Register Setdata Field Descriptions Set Data Register SetdataClear Data Register Clrdata Clear Data Register ClrdataClear Data Register Clrdata Field Descriptions Input Data Register Indata Field Descriptions Input Data Register IndataSet Rising Edge Interrupt Register Setristrig Set Rising Edge Interrupt Register SetristrigClear Rising Edge Interrupt Register Clrristrig Clear Rising Edge Interrupt Register ClrristrigSet Falling Edge Interrupt Register Setfaltrig Set Falling Edge Interrupt Register SetfaltrigClear Falling Edge Interrupt Register Clrfaltrig Clear Falling Edge Interrupt Register ClrfaltrigThis page is intentionally left blank Index
Related manuals
Manual 218 pages 2.08 Kb