Texas instruments vlynq port user's guide (49 pages)
Summary of Contents for Texas Instruments TMS320C645x
Page 1
TMS320C645x DSP General-Purpose Input/Output (GPIO) User’s Guide Literature Number: SPRU724 December 2005...
Page 2
TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:...
About This Manual This document describes the general-purpose input/output (GPIO) peripheral in the digital signal processors (DSPs) of the TMS320C645x™ DSP family. Notational Conventions This document uses the following conventions. Hexadecimal numbers are shown with the suffix h. For example, the following number is 40 hexadecimal (decimal 64): 40h.
Page 4
Trademarks Related Documentation From Texas Instruments / Trademarks TMS320C6000 Programmer’s Guide (literature number SPRU198) describes ways to optimize C and assembly code for the TMS320C6000t DSPs and includes application program examples. TMS320C6000 Code Composer Studio Tutorial (literature number SPRU301) introduces the Code Composer Studiot integrated develop- ment environment and software tools.
Page 6
Figures Figures TMS320C645x DSP Block Diagram GPIO Peripheral Block Diagram Interrupt Per-Bank Enable Register (BINTEN) Direction Register (DIR) Output Data Register (OUT_DATA) Set Data Register (SET_DATA) Clear Data Register (CLR_DATA) Input Data Register (IN_DATA) Set Rising Edge Interrupt Register (SET_RIS_TRIG)
Page 7
GPIO Interrupt and EDMA Event Configuration Options GPIO Registers ..............Interrupt Per-Bank Enable Register (BINTEN) Field Descriptions Direction Register (DIR) Field Descriptions Output Data Register (OUT_DATA) Field Descriptions...
Page 8
This page is intentionally left blank. General-Purpose Input/Output (GPIO) SPRU724...
In addition, the GPIO peripheral can produce CPU interrupts and EDMA synchronization events in different interrupt/event generation modes. Figure 1 shows the GPIO peripheral in the TMS320C645x™ DSP. Figure 2 shows the GPIO peripheral block diagram. SPRU724...
Overview Figure 1. TMS320C645x DSP Block Diagram EMIFA DDR2 memory controller PLL2 GPIO Other peripherals EDMA controller Boot PLL2 configuration Some GPIO pins are MUXed with other device pins. Refer to the device-specific datasheet for details on specific MUXing and for the availability of the register bits.
GPIO Function GPIO Function You can independently configure each GPIO pin (GPn) as either an input or an output using the GPIO direction registers. The GPIO direction register (DIR) specifies the direction of each GPIO signal. Logic 0 indicates the GPIO pin is configured as output, and logic 1 indicates input.
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.
Emulation Halt Operation Interrupt and Event Generation / Interrupts and Events Reading the SET_RIS_TRIG or CLR_RIS_TRIG register returns the value of RIS_TRIG register. Reading from SET_FAL_TRIG and CLR_FAL_TRIG register returns the value of FAL_TRIG register. To use the GPIO pins as sources for CPU interrupts and EDMA events, bit 0 in the bank interrupt enable register (BINTEN) must be set to 1.
Registers The GPIO peripheral is configured through the registers listed in Table 2. See the device-specific datasheet for the memory address of these registers. Table 2. GPIO Registers Offsets Acronym 0008 BINTEN 0010 0014 OUT_DATA 0018 SET_DATA 001C CLR_DATA 0020 IN_DATA 0024 SET_RIS_TRIG...
Registers Interrupt Per-Bank Enable Register (BINTEN) To use the GPIO pins as sources for CPU interrupts and EDMA events, bit 0 in the bank interrupt enable register (BINTEN) must be set. BINTEN is shown in Figure 3 and described in Table 3. Figure 3.
Direction Register (DIR) The GPIO direction register (DIR) determines if a given GPIO pin is an input or an output. The GPDIR is shown in Figure 4 and described in Table 4. By default, all the GPIO pins are configured as input pins. When GPIO pins are configured as output pins, the GPIO output buffer drives the GPIO pin.
Registers Output Data Register (OUT_DATA) The GPIO output data register (OUT_DATA) indicates the value to be driven on a given GPIO output pin. The OUT_DATA registers are shown in Figure 5 and described in Table 5. Figure 5. Output Data Register (OUT_DATA) OUT15 OUT14 OUT13...
Set Data Register (SET_DATA) The GPIO set data register (SET_DATA) is shown in Figure 6 and described in Table 6. SET_DATA provides an alternate means of driving GPIO outputs high. Writing a 1 to a bit of SET_DATA sets the corresponding bit in OUT_DATA.
Registers Clear Data Register (CLR_DATA) The GPIO clear data register (CLR_DATA) is shown in Figure 7 and described in Table 7. CLR_DATA provides an alternate means of driving GPIO outputs low. Writing a 1 to a bit of CLR_DATA clears the corresponding bit in OUT_DATA.
Input Data Register (IN_DATA) The GPIO input data register (IN_DATA) reflects the state of the GPIO pins. The IN_DATA register is shown in Figure 8 and described in Table 8. When read, IN_DATA returns the state of the GPIO pins regardless of the state of the corresponding bits in the DIR and OUT_DATA registers.
Registers Set Rising Edge Interrupt Register (SET_RIS_TRIG) The GPIO rising trigger register (RIS_TRIG) configures the edge detection logic to trigger GPIO interrupts and EDMA events on the rising edge of GPIO signals. Setting a bit to 1 in RIS_TRIG causes the corresponding GPIO interrupt and EDMA event (GPINTn) to be generated on the rising edge of GPn.
Clear Rising Edge Interrupt Register (CLR_RIS_TRIG) The GPIO rising trigger register (RIS_TRIG) configures the edge detection logic to trigger GPIO interrupts and EDMA events on the rising edge of GPIO signals. Setting a bit to 1 in RIS_TRIG causes the corresponding GPIO interrupt and EDMA event (GPINTn) to be generated on the rising edge of GPn.
Registers Set Falling Edge Interrupt Register (SET_FAL_TRIG) The GPIO falling trigger register (FAL_TRIG) configures the edge detection logic to trigger GPIO interrupts and EDMA events on the falling edge of GPIO signals. Setting a bit to 1 in FAL_TRIG causes the corresponding GPIO interrupt and EDMA event (GPINTn) to be generated on the falling edge of GPn.
5.10 Clear Falling Edge Interrupt Register (CLR_FAL_TRIG) The GPIO falling trigger register (FAL_TRIG) configures the edge detection logic to trigger GPIO interrupts and EDMA events on the falling edge of GPIO signals. Setting a bit to 1 in FAL_TRIG causes the corresponding GPIO interrupt and EDMA event (GPINTn) to be generated on the falling edge of GPn.
Page 26
This page is intentionally left blank. General-Purpose Input/Output (GPIO) SPRU724...
Page 27
C645x DSP 10 GPIO 11 event generation 13 events 14 function 12 SPRU724 interrupt generation 13 interrupts 14 notational conventions 3 overview 9 registers 15 related documentation from Texas Instruments 3 trademarks 4 General-Purpose Input/Output (GPIO) Index Index...
Need help?
Do you have a question about the TMS320C645x and is the answer not in the manual?
Questions and answers