Interaction With A Single Pin - Texas Instruments UCD3138 Technical Reference Manual

Digital power supply controller
Hide thumbs Also See for UCD3138:
Table of Contents

Advertisement

Interaction with a Single Pin

Please note, Global IO naming and assignment is tied to a specific I/O pin and has a one-to-one
relationship with the normal function of each I/O pin. Therefore configuration of a pin functionality using
the IOMUX register will not affect its GPIO assignment.
For example, if TCK pin is configured by IOMUX to serve as PWM-0, then the bit
"MiscAnalogRegs.GLBIOEN.bit.TCK_IO_EN" will still control this pin, and
"MiscAnalogRegs.GLBIOEN.bit.TMR_PWM0_IO_EN" will have no effect on the state of this pin.
9.10 Interaction with a Single Pin
Each bit in the global I/O register is defined as a single bit bit-field inside the UCD3138_misc_analog.h
header file.
The following examples demonstrate interaction with these bits. The examples also intend to clarify and
compare the utilization of local peripheral controls versus the use of centralized "Global I/O" controls.
Example 1: Setting a DPWM3B pin as a general purpose output (GPO), and set the output high. The
following examples demonstrate two alternatives.
Example 1.1: configuration through DPWM registers:
Dpwm3Regs.DPWMCTRL1.bit.GPIO_A_ENA = 1;
Dpwm3Regs.DPWMCTRL1.bit.PWM_A_OE = 0;
Dpwm3Regs.DPWMCTRL1.bit.GPIO_A_VAL = 1;
Example 1.2: configuration through Global I/O registers:
MiscAnalogRegs.GLBIOEN.bit.DPWM3A_IO_EN = 1;
MiscAnalogRegs.GLBIOOE.bit.DPWM3A_IO_OE = 1; // 1 = output, 0 = input
MiscAnalogRegs.GLBIOVAL.bit.DPWM3A_IO_VALUE = 1;// Set output to high
Example 2: Setting a pin as a general purpose input (GPO). The following examples demonstrate two
alternatives.
Example 2.1: configuration through GIO (fault) registers:
GioRegs.FAULTDIR.bit.FLT2_DIR = 0;
Example 2.2: configuration through Global I/O registers:
MiscAnalogRegs.GLBIOEN.bit.FAULT2_IO_EN = 1; //Configure FAULT2 as GPIO
MiscAnalogRegs.GLBIOOE.bit.FAULT2_IO_OE = 0; // 1 = output, 0 = input
344
Advanced Power Management Control Functions
// Configure DPWM3A as a GPIO
// 0 means output, 1 means input
// Set output to high
// Set DPWM3A as GPIO
// 1 means output, 0 means input
Copyright © 2016, Texas Instruments Incorporated
SNIU028A – February 2016 – Revised April 2016
Submit Documentation Feedback
www.ti.com

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents