Contents ........................Introduction ....................Scope of This Document ......A Guide to Other Documentation for all Members of UCD3138 Family of Products ................. Digital Pulse Width Modulator (DPWM) ..................... DPWM Block Diagram ............. Introduction to DPWM (DPWM Multi-Mode, Open Loop) ......................
Page 12
13.6.1 Calculation of Checksum ..................... 13.6.2 Reading Checksum ..................13.7 Trim Flash Checksum Verification ............13.8 Boot ROM for the Other Members of the UCD3138 Family ................13.8.1 UCD3138064 and UCD3138064A ................13.8.2 UCD3138A64 and UCD3138A64A ................13.8.3 UCD3138128 and UCD3138128A ......................
Page 15
.................... 2-9. DPWM – Leading Edge Mode ..................... 2-10. SyncFET IDE (Normal Mode) ........2-11. Resonant LLC implementation in UCD3138 with Automatic Mode Switching .............. 2-12. Mechanism for Automatic Mode Switching in UCD3138 ..................2-13. UCD3138 Edge-Gen & Intra-Mux ..........................
Page 16
2-49. DPWM Edge PWM Generation Control Register (DPWMEDGEGEN) ........... 2-50. DPWM Filter Duty Read Register (DPWMFILTERDUTYREAD) ..............2-51. DPWM BIST Status Register (DPWMBISTSTAT) 3-1. Simplified Block Diagram of Front End in UCD3138 (Front End 2 recommended for Peak Current Mode ........................Control) ..........................3-2................
Page 23
List of Tables ............... 2-1. DPWM Register Time Resolutions in UCD3138 ..2-2. DPWM Period Register (DPWMPRD) All other 4 ns registers with standard alignment are the same............. 2-3. DPWM Sample Trigger 1 Register (DPWMSAMPTRIG1) 2-4. DPWM Event 2 Register (DPWMEV2) Event 3 and 4 are the same, Cycle Adjust registers only go to bit 15 ........................
Page 27
12-12. UART I/O Control Register (UARTIOCTRLSCLK, UARTIOCTRLRX, UARTIOCTRLTX) Register Field ....................... Descriptions ............. 13-1. ROM Version for the Other Members of the UCD3138 Family ............... 13-2. Boot ROM Mass Erase Data Byte Parameter Values ............13-3. Boot ROM Execute Flash Command Byte, Valid Values ............
267ksps general purpose ADC with up to 14 channels, timers, interrupt control, JTAG debug and PMBus & UART communications ports. In terms of memory, UCD3138 offers 32KB of program flash, 2kB of data flash, 4KB RAM and 4KB of ROM.
Page 31
A Guide to Other Documentation for all Members of UCD3138 Family of Products www.ti.com UCD3138A64/ UCD3138064 UCD3138A Programmer’s UCD3138128 Module Function\Manual Programmer's Programmer's Manual Programmer’s Manual Manual Manual CPCC, DTC, GLBEN, Light load, Loop Mux SLUU995 Analog Comp, Digital Comp, IDE,...
Page 32
ADC, which will trigger the Filter at the end of its conversion. The UCD3138 device supports multiple sets of the Digital Power Peripherals affording the ability to control upto 3 feedback loops (voltage or current) and drive 8 outputs simultaneously. To inter-connect all the DPPs, there is a large module called the Loop Mux.
However, in discontinuous mode, the SR FET needs to be turned off before the end of the period. The UCD3138 hardware provides an automatic function to make this easier. In this case, the falling edge of DPWMB is adjusted, as shown below:...
> fr Tr = 1/fr Tr = 1/fr Figure 2-11. Resonant LLC implementation in UCD3138 with Automatic Mode Switching 2.10.2 Mechanism for Automatic Mode Switching Many of the configuration parameters for the DPWM, including the mode, are in DPWM Control Register 1.
Control Register 1 Figure 2-12. Mechanism for Automatic Mode Switching in UCD3138 As shown, the registers are used in pairs for hysteresis. The transition from Control Register 1 to Auto Config Mid only takes place when the Filter Duty goes above the Low Upper threshold. It does not go back to Control Register 1 until the Low Lower Threshold is passed.
2.11 DPWMC, Edge Generation, IntraMax The UCD3138 has sophisticated hardware for generating complex waveforms beyond the simple DPWMA and DPWMB waveforms already discussed. The DPWMC, the Edge Generation Module, and the IntraMux play a key role in delivering this capability.
Different registers in the DPWM block have different time resolutions. Pulse widths are generally adjustable in nominal 250 picosecond steps, while period and phase shift are adjustable in 4 nanosecond steps. The sample trigger is adjustable in 16 nanosecond steps. Table 2-1. DPWM Register Time Resolutions in UCD3138 Register Resolution...
4 ns LSbit 14 (unsigned) On the UCD3138, all these registers are aligned so that their bit fields match the scaling, except for the Resonant Duty and Adaptive Sample register. All the registers are unsigned, except for the 2 adjust registers, Resonant Duty and Adaptive Sample register, which are signed to permit positive or negative adjustment.
Setting the CLA_DUTY_ADJ_EN bit enables the Current Balancing logic to modify the input to the DPWM so that current controlled by this DPWM can be balanced with the current controlled by another DPWM in the same UCD3138. For more information, see the Current Balancing section.
For most topologies, mode 1 is used, and dead times or minimum pulse widths are used to keep moving edges out of the first 72nsec of the DPWM period. Please refer to the reference firmware code provided with UCD3138 EVMs for specific guidance regarding each topology. 2.16.11 Check Override The CHECK_OVERRIDE bit, when set, overrides the internal DPWM checking.
2.16.15 Asynchronous Protection Disable The PWM_A_PROT_DIS and PWM_B_PROT_DIS bits disable asynchronous protection on their respective pins. Please consult to the reference firmware code provided with UCD3138 EVMs for specific guidance on whether to set these bits or not in the desired topology.
(Front End 2 recommended for Peak Current Mode Control) The input to the Front End is a differential signal on 2 input pins (EANx, EAPx, x=0, 1, 2) of the UCD3138 device. A differential amplifier resolves this to a single ended signal, representing the difference between the two pins.
Page 112
There is also a single ended comparator connected with EAP pin and the DAC which is used for Peak Current Mode control. Front End 2 is recommended for Peak Current mode control because blanking time is available only on FE2 in UCD3138(RMH,RHA,RGC). All of these are described in more details in later sections of this chapter.
3 ramp functions running simultaneously. 3.3.1 DAC Ramp Overview The Front End Control Module in UCD3138 provides the capability to generate an automated ramp of the DAC set point through hardware. Firmware has the capability to configure the following parameters of the ramp: 1.
These two modules control the width of DPWMB as shown below: Figure 3-8. Ideal Diode Emulation (IDE) Module in UCD3138 The Sync FET Ramp is similar to the DAC Ramp, and uses the same hardware, but it needs a starting point, which is provided by the SYNC_FET_RAMP_START bits in the RAMPCTRL register.
EADC error, the AFE gain and DAC setpoint are adjusted. 3.4.3 Non-Continuous SAR Mode UCD3138 features two modes when it attempts to use a SAR algorithm to determine an absolute voltage. The first mode is Non-Continuous SAR mode. In this mode, the SAR Control Module restarts the SAR algorithm on each sample trigger from the DPWM module.
Chapter 4 SNIU028A – February 2016 – Revised April 2016 Filter The UCD3138 filter is a PID filter with many enhancements for power supply control. Some of its features include: • PID Based Architecture • Additional α coefficient and history in D branch •...
Configuring the link between the two filters is simple and is shown below. The actual filter settings and operation for feed forward are available in the Hard Switching Full Bridge EVM (UCD3138HSFBEVM-029) reference code from Texas Instruments. Here is an example of link code: LoopMuxRegs.FILTERMUX.bit.FILTER0_FFWD_SEL = 0;...
DAC control function should be triggered just after the end of the EADC conversion to allow maximum DAC settling time. For DAC settling time, please refer to the UCD3138 device datasheet. The FECTRLxMUX registers also permit using the Nonlinear Select registers in the Filter to set the step points for Automatic Gain Shifting in the Front End.
There are added features which permit output of fixed size pulses in burst mode. This function is very application specific. Consult the reference firmware code provided with the UCD3138 EVM for the desired topology for further information.
PCM_EN – enables peak current mode Refer to the reference firmware code provided with UCD3138PSFBEVM-027 and TI application note for Phase Shift Full Bridge peak current mode control implementation with UCD3138. 5.13 Automatic Cycle Adjustment The Loop Mux contains registers which control and monitor automatic cycle adjustment. It can be used to balance current between two legs of a parallel topology, such as a multiphase PFC.
Even though most of the control for fault response action is based in the DPWM registers, it is discussed in this section (in this way all information relating to the Fault information is available in one location). Here is an overview of the fault handling system in the UCD3138: Fault Fault Detection...
The ACOMP_x_OUT_EN bit when set, puts the DAC value out on the ADC pin, which can be used as an external reference. Consult the UCD3138 device datasheet for additional information. When this bit is enabled, obviously the comparator output signals are not valid.
(B_MAX_COUNT) Fault Enable (ALL_FAULT_EN) Edge Generation Figure 6-3. UCD3138 DPWM Fault Action This drawing fits in with the overview of the DPWM in Figure 2-1. The portion expanded here is the fault handler portion. The connection of the CLIM/CBC signal to the Timing Generation Module is also shown.
EXT-INT has caused an interrupt. Writing a 1 to a bit will clear the interrupt flag. 0 = No Interrupt detected (Default) 1 = Interrupt pending 7.13 References 1. UCD3138 ARM and Digital System Programmer’s Manual (SLUU996) 2. UCD3138 ARM and Digital System Programmer’s Manual (SLUU994) 3. UCD3138 Device Datasheet (SLUSAP2) GIO Module SNIU028A –...
Chapter 8 SNIU028A – February 2016 – Revised April 2016 ADC12 Overview The ADC 12 in UCD3138 digital controller is a 12 bit, high speed analog to digital converter. It comes equipped with the following features: • Typical conversion speed of 267 ksps •...
ADC12 Input Impedance Model Figure 8-2 shows a simplified model of the input circuit of UCD3138 ADC12. Figure 8-2. ADC12 Input Impedance Model The first portion is a 16-to-1 multiplexer that selects the channel to be converted. The second portion is the sample and hold circuit that is controlled by the control block of ADC12.
UCD3138 ADC12 can, the input impedance is around 300kohm; at a sampling frequency of below 150kHz, the channel impedance is above 3Mohm. This data can be used as a general guideline of designing proper input R for the UCD3138 ADC12, or determine a proper operation frequency for a given R.
S/H capacitor to discharge. Thus the voltage remaining on the S/H capacitor will affect the next conversion. Generally, for UCD3138, several ADC channels are used for different monitoring purposes. When designing the ADC input circuit, it is highly recommended to avoid high impedance node, because high impedance node may result in extra impedance roll-offs due to crosstalk.
ADC12 block are referred to by channel numbers. 14 of the ADC Channels are connected to external pins. The remaining 2 channels are tied to an internal temperature sensor and an internal test channel. The following table details the channel mapping utilized on UCD3138. Channel Number...
PMBus Addressing www.ti.com 8.13 PMBus Addressing UCD3138 offers two constant current sources for excitation of resistors used for setting the PMBus address, as shown in Figure 8-13. The two current sources are connected to CH-0 and CH-1 of ADC-12 and are disabled as default. The nominal current is preset to 10 µA.
There is only one conversion unit in UCD3138 ADC. But there are two S/H units to enable dual sample and hold function. The first one is the normal one we used for all channels. The second one shown in Figure 8-15 the dual sample and hold S/H.
• PWM bus current sharing • Master/Slave current sharing A simplified schematic of the current sharing circuitry integrated in UCD3138 is shown in the drawing below: Advanced Power Management Control Functions SNIU028A – February 2016 – Revised April 2016 Submit Documentation Feedback...
The period and the duty of 8-bit PWM current source and the state of the θ1 and θ2 switches can be controlled through the current sharing control register (CSCTRL). For more details please refer to Application Note on UCD3138 Current Sharing. SNIU028A – February 2016 – Revised April 2016...
Please refer to Section 9.8.7 and Section 3.7 of UCD3138 device datasheet for more information. Miscellaneous Analog Control Registers 9.8.1 Package ID Register (PKGID) Address FFF7F010 Figure 9-4.
GPIO Overview Majority of the pins in UCD3138 can be configured to serve as a general purpose input or output pin (GPIO). The only pins that can not be configured as GPIO pins are the Supply pins, Ground pins, ADC-12 analog input pins, EADC analog input pins and RESET pin.
SNIU028A – February 2016 – Revised April 2016 PMBus Interface/I2C Interface The UCD3138 family has a powerful and flexible PMBus/I2C interface. It has support for master mode, but its primary use is in slave mode. Here are some of its features in slave mode: •...
The I2C bus is very similar to the PMBus. One difference is that the I2C has no maximum clock low time. The PMBus has a 35 msec maximum clock low time, and the UCD3138 PMBus interface automatically detect violations of this. If this functionality is not desired, you can set the CLK_LO_DIS bit in PMBCTRL3.
For many applications, clock stretching is acceptable, but there may be requirements for minimal or no clock stretching. The UCD3138 family PMBus/I2C architecture permits this for some cases For example, write messages up to 3 bytes and command can be handled in one operation using the 4 byte buffer and automated ACK.
Device Addr Figure 10-16. Alert Response The UCD3138 PMBus interface provides an automated handling of the ALERT Response. To enable it, set the ALERT_EN bit in PMBCTRL3. This will pull the ALERT pin low, and enable the ALERT response from the hardware. If MAN_SLAVE_ACK is not set, the hardware will automatically acknowledge the special ALERT address, and will automatically to the arbitration with the device address.
On the UCD3138, and UCD3138064, this is the case. On the UCD3138A64 and UCD3138128 and all A versions, stopping the message in the middle of the byte should be handled correctly.
The internal clock is the default. To select the external clock source instead, execute this C equation: TimerRegs.T24CNTCTRL.bit.EXT_CLK_SEL = 1; All C code references in this document use standard TI header files, provided as part of the UCD3138 EVM (UCD3138PFCEVM-026, UCD3138LLCEVM-028 etc) reference firmware.
TimerRegs.T16PWM0CNTCTRL.bit.SW_RESET = 1; //allow counter to run In UCD3138 the interrupt flags are not cleared automatically by hardware when the interrupt is serviced. Therefore the interrupt flag needs to be manually cleared by adding the following statement at the end of the relevant interrupt service routine.
Note – Bits indicated with a * are only available for 16 bit timers which have an external pin associated with them. On the UCD3138 and most family members, this is only PWM0 and PWM1. On the UCD3138128 and UCD3138A64 80 pin devices, all 4 timers have an external pin.
SNIU028A – February 2016 – Revised April 2016 UART Overview UCD3138 has two UART modules capable of independently communicating toward two separate peers. Having more than one UART module is also especially useful for power supplies than need to communicate with an isolated section (eg. with the digital PFC controller, or a Power Metering ASIC in offline AC/DC power supplies) through opto-isolators.
12.2 Asynchronous Timing Mode Asynchronous timing mode is the only mode supported in UCD3138. In the asynchronous timing mode, each bit in a frame has a duration of 8 UART baud clock periods. Each bit therefore consists of 8 samples (one for each clock period).
When not enabled, the interrupts are not asserted; however, polled operation of the UART is still possible because the interrupt flags continue to indicate module events. The UART module generates three interrupt requests to the UCD3138 system module: one each for transmitter, receiver, and error interrupts. Each of these interrupts must also be configured in the UCD3138 system module before operation.
1 = One parity bit included in each frame SYNC_MODE Selects between Synchronous mode and Asynchronous mode 0 = Synchronous (Not supported in UCD3138, set this bit always to one) 1 = Asynchronous ADDR_MODE Selects between Idle and Address Bit Mode...
Boot ROM and Boot Flash The Boot ROM and the Boot Flash are key elements in the use of the UCD3138, which provide capability to examine, and modify memory and registers and download programs into the device. They also offer security for production programs.
If the checksum is not valid, the Boot ROM will permit examination and modification of memory and peripherals. 13.1.1 Initializing UCD3138 The Boot ROM performs several initializations on the UCD3138. The most important one is memory map initialization. This is described in Chapter 5 Chapter 13.1.2 Verifying Checksums...
Boot ROM Function www.ti.com Figure 13-1. UCD3138 Boot ROM Execution After Power-On/Reset The Boot Flash Checksum at address 0x07FC provides more sophisticated field upgradeability. It is useful for cases which require an upgrade: • Via PMBus, but at a different PMBus address from the ROM’s standard PMBus address •...
13.2 Memory Read Functionality A total of 4 PMBus command bytes have been assigned for read functionality in the UCD3138 Boot ROM. 3 of these messages utilize a read format, in which the PMBus Master provides an address and command byte to the UCD3138 and expects read data returned by the slave.
Read Version message by sending a device address and a command byte of 0xEC. The Boot ROM will interpret the command byte and return the block size of 4 bytes, the current version number and the PEC byte for the message. The current version for the version of UCD3138 should be 0x00030002. Start Device Address &...
0x00050001 13.4 Memory Write Functionality A total of 6 PMBus command bytes have been assigned for write functionality in the UCD3138 Boot ROM. Each of these write-based PMBus messages utilizes a write format, in which the PMBus Master provides an address, the command byte and data bytes to the PMBus Slave (UCD3138).
In this case, 200 µsec should be allowed before starting the next message. 13.5 Flash Functions In addition to the ability to read and write internal memory map locations, the UCD3138 Boot ROM supports flash functions. These functions allow the user to perform a mass erase or page erase of either the Program Flash or Data Flash.
Like Mass Erase, the Page Erase command requires 20 milliseconds to complete. No PMBus commands should be sent during this time. For the other members of the UCD3138 family, the "flash select" parameter can have different values, depending on which program flash block is being acted upon during the page erase. See Table 13-2 more details.
For the other members of the UCD3138 family which have more than one block of program flash, there is sometimes a second option to control which program flash block should be mapped to address 0. For this second option, the command byte should be set to 0xF7.
13.7 Trim Flash Checksum Verification The Boot ROM also initializes several trim registers in the UCD3138. This trim data comes from a special trim flash area. The trim data is programmed into the trim flash when the device is tested. This trim flash has its own checksum.
If program flash block 1 is mapped to address 0x0000, program flash block 2 is mapped to address 0x8000, and vice-versa. The UCD3138 has a PMBus command called “execute flash” with a command code of 0xF0. This causes the program to execute. On the UCD3138064, the same command code causes program flash block 1 to be placed in control.
13.8.2 UCD3138A64 and UCD3138A64A On the UCD3138 and UCD3138064, the checksum for an area of program flash is calculated as the sum of bytes over the program flash area. For example, to calculate the checksum from start_address to end_address, the Boot ROM program on...
Boot ROM for the Other Members of the UCD3138 Family www.ti.com Figure 13-4. UCD3138A64 Boot ROM Execution After Power-on/Reset Figure 13-4 is a flowchart showing the order in which the ROM verifies the integrity of the program flash contents using the different checksums.
ROM checksum program from checking the integrity of an empty block of memory. Otherwise a block filled with zeroes would pass the checksum test. The UCD3138 has a PMBus command called “execute flash” with a command code of 0xF0. This causes the program to execute. On the UCD3138128, the same command code cause: •...
FIQ is reserved for one single interrupt source that requires fast response time, like faults or any time critical task that requires fast response Therefore all interrupt sources in UCD3138 peripherals can be mapped into one of the following interrupt service routines.
This chapter explains how to set certain sections of code to operate in Thumb (16 bit) or ARM (32 bit) mode. The ARM7TDMI-S (in UCD3138) is a unique processor in that it offers the performance of a 32-bit architecture with the code density of a 16-bit architecture. This is achieved by supporting both a 16-bit instruction set and a 32-bit instruction set and allowing switching dynamically between the two sets.
It is no longer compiled around each function as in 3.3. 14.5.5 UCD3138 Reference Code The UCD3138 reference code provided along with the EVMs (UCD3138PFCEVM-026, UCD3138PSFBEVM-027, UCD3138LLCEVM-028, UCD3138HSFBEVM-029) is written in a way that the program executes mostly in user mode and switches to privileged modes only if it needs to change interrupt configuration or program the flash memory.
UCD3138 has programmable memory addressing which is used by the Boot ROM to remap the memories. With the UCD3138, there is no need for the customer to remap memory. However, with the 3138064 and other family members, it may be useful. These chips have more than one program flash block.
Memory Select 15 => DPWM 0 (1Kx32) Memory Select 16 => Front End Control 0 (1Kx32) Memory Select 17 => Program Flash 1(8Kx32) – Not in UCD3138, in all other devices Memory Select 18 => Program Flash 2(8Kx32) - Only in 3138128 Memory Select 19 =>...
15.2.5 Memory Fine Base Address High Load Differences for Enhanced 3138 Devices These tables show the values loaded into the registers in the UCD3138. To make room for additional Program Flash in the UCD3138064 and other devices with more program flash, the registers have an additional bit set that moves the peripherals to start at 0x120000 instead of at 0x20000.
There may be a need for customer programs to erase and program both Program and Data Flash, so this is discussed in some detail. 16.1.1 Memory Mapping Basics There are 4 memory address spaces in the UCD3138. Each memory space has a pair of registers to set its address and block size: Register...
The memory map changes primarily because the vectors – for reset, interrupts, and faults – are located starting at location 0 in memory. When the UCD3138 powers up, the ROM needs to control the vectors. When the memory is configured, but the ROM is still executing, the ROM still needs to control the vectors.
Note that all flash operations other than read involve considerable delay. Erase delays, especially, can be several milliseconds. Consult UCD3138 datasheet for specific delay information. 16.1.7 Waiting for Flash Operations to Finish All flash modifications take more than one instruction cycle to complete. Both flash control registers have a BUSY bit that should be checked to verify that no flash process is already underway.
RAM or program Flash. The UCD3138 has 2048 bytes of Data flash organized in 64 blocks of 32 bytes each. Erasing can be done a block at a time. To erase a block, first write the key to the FLASHILOCK register. Then simply write to the Data Flash Control Register (DFLASHCTRL) with the block number in the low 6 bits (PAGE_SEL) and a 1 in bit 9 (PAGE_ERASE).
Page 507
(by hardware) just before the ISR execution ends. Since UCD3138 does not clear the interrupt flags automatically, this should be done by the ISR routine. Negligence to clear the relevant interrupt flag will cause immediate re-invocation of the ISR instantly after previous ISR execution ended.
This section starts with a quick start summary which gives a recipe for best practices for firmware development and for production. Next, it provides a detailed view of the UCD3138 Flash programming hardware and Boot ROM as a starting point. Finally, it goes into detail with code examples for the exact procedures for Flash management for firmware development and for production.
The names just show the main use for each memory. After reset, the UCD3138 starts executing in ROM. In this mode, the ROM is mapped to fill up the entire first 64 Kbytes of memory. The 4 Kbytes of ROM are repeated 16 times.
It is also possible to write all zeroes to the checksum and clear it. That way, the next time the UCD3138 is reset, it will power up into ROM mode and the memory can be examined. This is best for development, so that the memory contents can be analyzed if necessary.
It is also necessary to ensure that the other chip will not transmit data when the UCD3138 is coming out of reset. If this is done, the UART RX pin can be used as a backdoor, and as an RX pin.
; //do nothing while it programs return; 17.5.3 Serial Port Based Backdoor Here is the code for a back door based on the serial RX line, as used in the UCD3138 training labs: void main() if(GioRegs.FAULTIN.bit.TMS_IN == 0) //emergency backdoor - //TMS is normally pulled up by external resistor clear_integrity_word();...
Changes from Original (February 2016) to A Revision ....................Page ................• Global change: removed references to DPWM app note • Updated/Changed document title from "UCD3138 Digital Power Peripherals" to "UCD3138 Digital Power Supply ..........................Controller" ....................• Updated references in Section 2.28 SNIU028A –...
IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue.
Need help?
Do you have a question about the UCD3138 and is the answer not in the manual?
Questions and answers